1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-11-06 09:09:29 +02:00

test: do not prefix version with v

This commit is contained in:
Carlos A Becker
2021-11-13 23:25:58 -03:00
parent b5ea693ada
commit f731173491
3 changed files with 16 additions and 16 deletions

View File

@@ -478,7 +478,7 @@ func TestInvalidConfig(t *testing.T) {
},
})
ctx.Git.CurrentTag = "v1.2.3"
ctx.Version = "v1.2.3"
ctx.Version = "1.2.3"
ctx.Artifacts.Add(&artifact.Artifact{
Name: "mybin",
Path: filepath.Join(dist, "mybin", "mybin"),

View File

@@ -79,7 +79,7 @@ func TestRunPipe(t *testing.T) {
},
})
ctx.Git.CurrentTag = "v1.2.3"
ctx.Version = "v1.2.3"
ctx.Version = "1.2.3"
addBinaries(t, ctx, "foo", filepath.Join(dist, "foo"))
addBinaries(t, ctx, "bar", filepath.Join(dist, "bar"))
require.NoError(t, Pipe{}.Run(ctx))
@@ -106,7 +106,7 @@ func TestRunPipeInvalidNameTemplate(t *testing.T) {
},
})
ctx.Git.CurrentTag = "v1.2.3"
ctx.Version = "v1.2.3"
ctx.Version = "1.2.3"
addBinaries(t, ctx, "foo", dist)
require.EqualError(t, Pipe{}.Run(ctx), `template: tmpl:1: unexpected "}" in operand`)
}
@@ -133,7 +133,7 @@ func TestRunPipeWithName(t *testing.T) {
},
})
ctx.Git.CurrentTag = "v1.2.3"
ctx.Version = "v1.2.3"
ctx.Version = "1.2.3"
addBinaries(t, ctx, "foo", dist)
require.NoError(t, Pipe{}.Run(ctx))
yamlFile, err := os.ReadFile(filepath.Join(dist, "foo_amd64", "prime", "meta", "snap.yaml"))
@@ -183,7 +183,7 @@ func TestRunPipeMetadata(t *testing.T) {
},
})
ctx.Git.CurrentTag = "v1.2.3"
ctx.Version = "v1.2.3"
ctx.Version = "1.2.3"
addBinaries(t, ctx, "foo", dist)
require.NoError(t, Pipe{}.Run(ctx))
yamlFile, err := os.ReadFile(filepath.Join(dist, "foo_amd64", "prime", "meta", "snap.yaml"))
@@ -244,7 +244,7 @@ func TestRunNoArguments(t *testing.T) {
},
})
ctx.Git.CurrentTag = "v1.2.3"
ctx.Version = "v1.2.3"
ctx.Version = "1.2.3"
addBinaries(t, ctx, "foo", dist)
require.NoError(t, Pipe{}.Run(ctx))
yamlFile, err := os.ReadFile(filepath.Join(dist, "foo_amd64", "prime", "meta", "snap.yaml"))
@@ -281,7 +281,7 @@ func TestCompleter(t *testing.T) {
},
})
ctx.Git.CurrentTag = "v1.2.3"
ctx.Version = "v1.2.3"
ctx.Version = "1.2.3"
addBinaries(t, ctx, "foo", dist)
addBinaries(t, ctx, "bar", dist)
require.NoError(t, Pipe{}.Run(ctx))
@@ -320,7 +320,7 @@ func TestCommand(t *testing.T) {
},
})
ctx.Git.CurrentTag = "v1.2.3"
ctx.Version = "v1.2.3"
ctx.Version = "1.2.3"
addBinaries(t, ctx, "foo", dist)
require.NoError(t, Pipe{}.Run(ctx))
yamlFile, err := os.ReadFile(filepath.Join(dist, "foo_amd64", "prime", "meta", "snap.yaml"))
@@ -360,7 +360,7 @@ func TestExtraFile(t *testing.T) {
},
})
ctx.Git.CurrentTag = "v1.2.3"
ctx.Version = "v1.2.3"
ctx.Version = "1.2.3"
addBinaries(t, ctx, "foo", dist)
require.NoError(t, Pipe{}.Run(ctx))