mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-30 04:50:45 +02:00
fix: snapshot version template should not have the leading 'v'
closes #5142
This commit is contained in:
parent
bce9035aa2
commit
d3f8bbf31a
@ -74,7 +74,7 @@ func TestLive(t *testing.T) {
|
||||
|
||||
ctx.Config.ProjectName = "Goreleaser"
|
||||
ctx.ReleaseURL = "https://goreleaser.com/customization/announce/bluesky"
|
||||
ctx.Version = "v1.26.0"
|
||||
ctx.Version = "1.26.0"
|
||||
|
||||
require.NoError(t, bluesky.Pipe{}.Default(ctx))
|
||||
require.NoError(t, bluesky.Pipe{}.Announce(ctx))
|
||||
|
@ -62,11 +62,11 @@ func TestSnapshotEmptyFinalName(t *testing.T) {
|
||||
func TestSnapshot(t *testing.T) {
|
||||
ctx := testctx.NewWithCfg(config.Project{
|
||||
Snapshot: config.Snapshot{
|
||||
VersionTemplate: "{{ incpatch .Tag }}",
|
||||
VersionTemplate: "{{ incpatch .Version }}",
|
||||
},
|
||||
}, testctx.WithCurrentTag("v1.2.3"))
|
||||
}, testctx.WithVersion("1.2.3"))
|
||||
require.NoError(t, Pipe{}.Run(ctx))
|
||||
require.Equal(t, "v1.2.4", ctx.Version)
|
||||
require.Equal(t, "1.2.4", ctx.Version)
|
||||
}
|
||||
|
||||
func TestSkip(t *testing.T) {
|
||||
|
@ -35,6 +35,11 @@ nightly:
|
||||
keep_single_release: true
|
||||
```
|
||||
|
||||
!!! warning
|
||||
|
||||
Do not use the `{{.Tag}}` field in the `version_template`, as the version
|
||||
should not have the leading `v`.
|
||||
|
||||
## How it works
|
||||
|
||||
When you run GoReleaser with `--nightly`, it will set the `Version` template
|
||||
|
@ -19,6 +19,11 @@ snapshot:
|
||||
version_template: "{{ incpatch .Version }}-devel"
|
||||
```
|
||||
|
||||
!!! warning
|
||||
|
||||
Do not use the `{{.Tag}}` field in the `version_template`, as the version
|
||||
should not have the leading `v`.
|
||||
|
||||
## How it works
|
||||
|
||||
When you run GoReleaser with `--snapshot`, it will set the `Version` template
|
||||
|
Loading…
x
Reference in New Issue
Block a user