Skip to content

Commit

Permalink
Use Version instead of Git tag to for .deb/.rpm (#1157)
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreF authored and caarlos0 committed Oct 5, 2019
1 parent 0506a99 commit e6c8682
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion internal/pipe/nfpm/nfpm.go
Expand Up @@ -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,
Expand Down
3 changes: 3 additions & 0 deletions internal/pipe/nfpm/nfpm_test.go
Expand Up @@ -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",
},
Expand All @@ -45,6 +46,7 @@ func TestRunPipeInvalidFormat(t *testing.T) {
},
},
})
ctx.Version = "1.2.3"
ctx.Git = context.GitInfo{
CurrentTag: "v1.2.3",
}
Expand Down Expand Up @@ -211,6 +213,7 @@ func TestCreateFileDoesntExist(t *testing.T) {
},
},
})
ctx.Version = "1.2.3"
ctx.Git = context.GitInfo{
CurrentTag: "v1.2.3",
}
Expand Down

0 comments on commit e6c8682

Please sign in to comment.