1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-02-13 13:48:40 +02:00

Merge pull request #238 from goreleaser/replacements

breaking: do not default to uname values
This commit is contained in:
Carlos Alexandro Becker 2017-05-18 16:07:46 -03:00 committed by GitHub
commit 4e896b9c8d
4 changed files with 6 additions and 15 deletions

View File

@ -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

View File

@ -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

View File

@ -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*",

View File

@ -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,