diff --git a/README.md b/README.md index 3fb8070e7..c1d4b002c 100644 --- a/README.md +++ b/README.md @@ -276,8 +276,6 @@ archive: # Replacements for GOOS and GOARCH on the archive name. # The keys should be valid GOOS or GOARCH values followed by your custom # replacements. - # By default, `replacements` replace GOOS and GOARCH values with valid outputs - # of `uname -s` and `uname -m` respectively. replacements: amd64: 64-bit 386: 32-bit diff --git a/goreleaser.yml b/goreleaser.yml index 0b62b0ed3..533f54853 100644 --- a/goreleaser.yml +++ b/goreleaser.yml @@ -13,6 +13,12 @@ build: - arm - arm64 archive: + replacements: + darwin: Darwin + linux: Linux + windows: Windows + 386: i386 + amd64: x86_64 format_overrides: - goos: windows format: zip diff --git a/pipeline/defaults/defaults.go b/pipeline/defaults/defaults.go index 67d98f7f0..1ef651210 100644 --- a/pipeline/defaults/defaults.go +++ b/pipeline/defaults/defaults.go @@ -81,18 +81,6 @@ func setArchiveDefaults(ctx *context.Context) error { if ctx.Config.Archive.Format == "" { ctx.Config.Archive.Format = "tar.gz" } - if len(ctx.Config.Archive.Replacements) == 0 { - ctx.Config.Archive.Replacements = map[string]string{ - "darwin": "Darwin", - "linux": "Linux", - "freebsd": "FreeBSD", - "openbsd": "OpenBSD", - "netbsd": "NetBSD", - "windows": "Windows", - "386": "i386", - "amd64": "x86_64", - } - } if len(ctx.Config.Archive.Files) == 0 { ctx.Config.Archive.Files = []string{ "licence*", diff --git a/pipeline/defaults/defaults_test.go b/pipeline/defaults/defaults_test.go index c051361fc..bdd9051a9 100644 --- a/pipeline/defaults/defaults_test.go +++ b/pipeline/defaults/defaults_test.go @@ -34,7 +34,6 @@ func TestFillBasicData(t *testing.T) { assert.Contains(ctx.Config.Build.Goarch, "amd64") assert.Contains(ctx.Config.Brew.Install, "bin.install \"goreleaser\"") assert.NotEmpty( - ctx.Config.Archive.Replacements, ctx.Config.Archive.NameTemplate, ctx.Config.Build.Ldflags, ctx.Config.Archive.Files,