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

feat: add url_template in brew section (#735)

This commit is contained in:
Grachev Mikhail
2018-07-26 16:03:28 +03:00
committed by Carlos Alexandro Becker
parent 9154294c00
commit 36bb63f86b
7 changed files with 40 additions and 32 deletions

View File

@@ -33,10 +33,11 @@ const (
timestamp = "Timestamp"
// artifact-only keys
os = "Os"
arch = "Arch"
arm = "Arm"
binary = "Binary"
os = "Os"
arch = "Arch"
arm = "Arm"
binary = "Binary"
artifactName = "ArtifactName"
)
// New Template
@@ -64,6 +65,7 @@ func (t *Template) WithArtifact(a artifact.Artifact, replacements map[string]str
t.fields[arch] = replace(replacements, a.Goarch)
t.fields[arm] = replace(replacements, a.Goarm)
t.fields[binary] = bin
t.fields[artifactName] = a.Name
return t
}