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

Use Version instead of Git tag to for .deb/.rpm (#1157)

This commit is contained in:
Pierre Fersing 2019-10-05 19:58:46 +02:00 committed by Carlos Alexandro Becker
parent 0506a9920d
commit e6c8682738
2 changed files with 4 additions and 1 deletions

View File

@ -146,7 +146,7 @@ func create(ctx *context.Context, fpm config.NFPM, format, arch string, binaries
Arch: arch,
Platform: "linux",
Name: ctx.Config.ProjectName,
Version: ctx.Git.CurrentTag,
Version: ctx.Version,
Section: "",
Priority: "",
Epoch: fpm.Epoch,

View File

@ -20,6 +20,7 @@ func TestDescription(t *testing.T) {
func TestRunPipeNoFormats(t *testing.T) {
var ctx = &context.Context{
Version: "1.0.0",
Git: context.GitInfo{
CurrentTag: "v1.0.0",
},
@ -45,6 +46,7 @@ func TestRunPipeInvalidFormat(t *testing.T) {
},
},
})
ctx.Version = "1.2.3"
ctx.Git = context.GitInfo{
CurrentTag: "v1.2.3",
}
@ -211,6 +213,7 @@ func TestCreateFileDoesntExist(t *testing.T) {
},
},
})
ctx.Version = "1.2.3"
ctx.Git = context.GitInfo{
CurrentTag: "v1.2.3",
}