diff --git a/internal/pipe/bluesky/bluesky_test.go b/internal/pipe/bluesky/bluesky_test.go index 55d84a284..403dc001b 100644 --- a/internal/pipe/bluesky/bluesky_test.go +++ b/internal/pipe/bluesky/bluesky_test.go @@ -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)) diff --git a/internal/pipe/snapshot/snapshot_test.go b/internal/pipe/snapshot/snapshot_test.go index d87a57cc1..185e5db38 100644 --- a/internal/pipe/snapshot/snapshot_test.go +++ b/internal/pipe/snapshot/snapshot_test.go @@ -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) { diff --git a/www/docs/customization/nightlies.md b/www/docs/customization/nightlies.md index d8f4fbbe3..b44715702 100644 --- a/www/docs/customization/nightlies.md +++ b/www/docs/customization/nightlies.md @@ -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 diff --git a/www/docs/customization/snapshots.md b/www/docs/customization/snapshots.md index c3673da10..c5b0488f9 100644 --- a/www/docs/customization/snapshots.md +++ b/www/docs/customization/snapshots.md @@ -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