1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00

fix: broken binary name

This commit is contained in:
Carlos Alexandro Becker 2018-07-09 00:29:15 -07:00
parent 92632956d1
commit c41b372f81
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -56,14 +56,14 @@ func New(ctx *context.Context) *Template {
// WithArtifacts populate fields from the artifact and replacements
func (t *Template) WithArtifact(a artifact.Artifact, replacements map[string]string) *Template {
var binary = a.Extra[binary]
if binary == "" {
binary = t.fields[projectName].(string)
var bin = a.Extra[binary]
if bin == "" {
bin = t.fields[projectName].(string)
}
t.fields[os] = replace(replacements, a.Goos)
t.fields[arch] = replace(replacements, a.Goarch)
t.fields[arm] = replace(replacements, a.Goarm)
t.fields[binary] = binary
t.fields[binary] = bin
return t
}