Skip to content

Commit 2aca5b7

Browse files
committed
Fix version embedding
1 parent f2432ca commit 2aca5b7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

.goreleaser.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ builds:
2222
- linux
2323
- windows
2424
- darwin
25+
# Note the need for prefixing a leading v
2526
ldflags:
26-
- "-s -w -X 'github.com/zph/polylint/cmd.version={{.Version}}' -X 'github.com/zph/polylint/cmd.commit={{.Commit}}' -X 'github.com/zph/polylint/cmd.date={{.Date}}' -X 'github.com/zph/polylint/cmd.builtBy=goreleaser'"
27+
- "-s -w -X 'github.com/zph/polylint/cmd.version=v{{.Version}}' -X 'github.com/zph/polylint/cmd.commit={{.Commit}}' -X 'github.com/zph/polylint/cmd.date={{.Date}}' -X 'github.com/zph/polylint/cmd.builtBy=goreleaser'"
2728

2829
archives:
2930
- format: tar.gz

0 commit comments

Comments
 (0)