You've already forked goreleaser
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:
@@ -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"),
|
||||
|
||||
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user