1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-12-18 00:19:15 +02:00

fix: snapshot version handling

This commit is contained in:
Carlos Alexandro Becker
2018-12-13 10:09:36 -02:00
committed by Carlos Alexandro Becker
parent 513473b446
commit a69ef61d60
7 changed files with 73 additions and 37 deletions

View File

@@ -224,23 +224,6 @@ func TestSnapshotDirty(t *testing.T) {
testlib.AssertSkipped(t, Pipe{}.Run(ctx))
}
func TestShortCommitHash(t *testing.T) {
_, back := testlib.Mktmp(t)
defer back()
testlib.GitInit(t)
testlib.GitRemoteAdd(t, "git@github.com:foo/bar.git")
testlib.GitCommit(t, "first")
var ctx = context.New(config.Project{
Snapshot: config.Snapshot{
NameTemplate: "{{.Commit}}",
},
})
ctx.Snapshot = true
ctx.Config.Git.ShortHash = true
testlib.AssertSkipped(t, Pipe{}.Run(ctx))
assert.Len(t, ctx.Version, 7)
}
func TestGitNotInPath(t *testing.T) {
var path = os.Getenv("PATH")
defer func() {