fix: use index for optional env var in version_template

Signed-off-by: Terry Howe <terrylhowe@gmail.com>
This commit is contained in:
Terry Howe 2026-05-02 10:34:04 -06:00
parent eaa09100b9
commit e49a1dc16e
No known key found for this signature in database

View file

@ -78,7 +78,7 @@ checksum:
name_template: 'checksums.txt'
snapshot:
version_template: "{{ if .Env.GORELEASER_CURRENT_TAG }}{{ .Env.GORELEASER_CURRENT_TAG }}{{ else }}{{ incpatch .Version }}-next{{ end }}"
version_template: "{{ if index .Env \"GORELEASER_CURRENT_TAG\" }}{{ .Env.GORELEASER_CURRENT_TAG }}{{ else }}{{ incpatch .Version }}-next{{ end }}"
changelog:
sort: asc