1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-11-06 09:09:29 +02:00

fix: properly template builds.gobinary

closes #4685
This commit is contained in:
Carlos Alexandro Becker
2024-03-16 11:49:56 -03:00
parent 0a272037b3
commit c9068b4b3c
3 changed files with 20 additions and 10 deletions

View File

@@ -195,14 +195,12 @@ func buildOptionsForTarget(ctx *context.Context, build config.Build, target stri
Goamd64: goamd64,
}
if err := tmpl.New(ctx).WithBuildOptions(buildOpts).ApplyAll(
&build.Binary,
&build.GoBinary,
); err != nil {
bin, err := tmpl.New(ctx).WithBuildOptions(buildOpts).Apply(build.Binary)
if err != nil {
return nil, err
}
name := build.Binary + ext
name := bin + ext
dir := fmt.Sprintf("%s_%s", build.ID, target)
if build.NoUniqueDistDir {
dir = ""