Skip to content

Commit 83359ad

Browse files
committed
build: fix linker flag
1 parent 46821ec commit 83359ad

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

.goreleaser.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ builds:
4141
flags:
4242
- -trimpath
4343
ldflags:
44-
- -s -w -X {{.ModulePath}.version={{.Version}} -X {{.ModulePath}}.commit={{.Commit}} -X {{.ModulePath}}.date={{ .CommitDate }} -X {{.ModulePath}}.treeState={{ .IsGitDirty }}
44+
- -s -w -X {{.ModulePath}/main.version={{.Version}} -X {{.ModulePath}}/main.commit={{.Commit}} -X {{.ModulePath}}/main.date={{ .CommitDate }}
4545

4646
universal_binaries:
4747
- replace: false

main.go

+3-4
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@ import (
1515

1616
// nolint: gochecknoglobals
1717
var (
18-
commit = "unknown"
19-
date = "unknown"
20-
treeState = "unknown"
21-
version = "dev"
18+
commit = "unknown"
19+
date = "unknown"
20+
version = "dev"
2221
)
2322

2423
func main() {

0 commit comments

Comments
 (0)