Skip to content

Commit 221c86e

Browse files
committed
Add GitTag/GitCommit/GitDirty etc. to Goreleaser config
1 parent a5566f0 commit 221c86e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.goreleaser.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ builds:
77
env:
88
- CGO_ENABLED=0
99
ldflags: |
10-
-s -w -extldflags '-static'
10+
-s -w -extldflags '-static' -X "main.GitTag={{.Tag}}" -X "main.GitCommit={{.ShortCommit}}" -X "main.GitDirty= " -X "main.BuildTime={{.Date}}"
1111
goos:
1212
- linux
1313
goarch:

0 commit comments

Comments
 (0)