Skip to content

Commit e9a606c

Browse files
build: form version string manually
- snapshot and release build has different .Version string
1 parent 83e21a6 commit e9a606c

File tree

1 file changed

+10
-12
lines changed

1 file changed

+10
-12
lines changed

.goreleaser.yml

+10-12
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,19 @@ before:
33
- go mod tidy
44

55
builds:
6-
-
7-
env:
6+
- env:
87
- CGO_ENABLED=0
98
goos:
109
- linux
1110
- windows
1211
- darwin
1312
ldflags:
14-
- -s -w -X github.com/conventionalcommit/commitlint/internal.version={{.Version}} -X github.com/conventionalcommit/commitlint/internal.commit={{.FullCommit}} -X github.com/conventionalcommit/commitlint/internal.buildTime={{.Date}}
13+
- -s -w -X github.com/conventionalcommit/commitlint/internal.version=v{{.Major}}.{{.Minor}}.{{.Patch}} -X github.com/conventionalcommit/commitlint/internal.commit={{.FullCommit}} -X github.com/conventionalcommit/commitlint/internal.buildTime={{.Date}}
1514
flags:
1615
- -tags=urfave_cli_no_docs
1716

1817
archives:
19-
-
20-
replacements:
18+
- replacements:
2119
darwin: Darwin
2220
linux: Linux
2321
windows: Windows
@@ -38,13 +36,13 @@ changelog:
3836
sort: asc
3937
filters:
4038
exclude:
41-
- '^docs:'
42-
- '^test:'
43-
- '^style:'
44-
- '^chore:'
45-
- '^refactor:'
46-
- '^build:'
47-
- '^ci:'
39+
- "^docs:"
40+
- "^test:"
41+
- "^style:"
42+
- "^chore:"
43+
- "^refactor:"
44+
- "^build:"
45+
- "^ci:"
4846

4947
release:
5048
draft: true

0 commit comments

Comments
 (0)