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

Merge branch 'master' into sem

This commit is contained in:
Carlos Alexandro Becker 2018-07-08 19:52:23 -07:00
commit 03cc843e8b
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940
2 changed files with 11 additions and 2 deletions

4
Gopkg.lock generated
View File

@ -140,8 +140,8 @@
"glob",
"rpm"
]
revision = "25eddcb1759ae5b07e79bb55727075fe43492a17"
version = "v0.9.2"
revision = "923d6a7473bfdbe7a583b7f3df1f3f780b1b73ab"
version = "v0.9.3"
[[projects]]
name = "github.com/imdario/mergo"

View File

@ -91,6 +91,9 @@ func TestRunPipe(t *testing.T) {
ConfigFiles: map[string]string{
"./testdata/testfile.txt": "/etc/nope.conf",
},
Replacements: map[string]string{
"linux": "Tux",
},
},
Overrides: map[string]config.NFPMOverridables{
"rpm": {
@ -101,6 +104,7 @@ func TestRunPipe(t *testing.T) {
},
},
})
ctx.Version = "1.0.0"
ctx.Git = context.GitInfo{CurrentTag: "v1.0.0"}
for _, goos := range []string{"linux", "darwin"} {
for _, goarch := range []string{"amd64", "386"} {
@ -114,6 +118,11 @@ func TestRunPipe(t *testing.T) {
}
}
assert.NoError(t, Pipe{}.Run(ctx))
var packages = ctx.Artifacts.Filter(artifact.ByType(artifact.LinuxPackage)).List()
assert.Len(t, packages, 4)
for _, pkg := range packages {
assert.Contains(t, pkg.Name, "mybin_1.0.0_Tux_", "linux should have been replaced by Tux")
}
assert.Len(t, ctx.Config.NFPM.Files, 1, "should not modify the config file list")
}