Skip to content

Commit 3b4f66f

Browse files
committed
fix: Set proper version during build
1 parent e04c634 commit 3b4f66f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.goreleaser.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,9 @@ builds:
2020
- -mod=readonly
2121
- -trimpath
2222
ldflags:
23+
- -X main.version={{ .Version }}
24+
- -X main.commit={{ .Commit }}
25+
- -X main.date={{ .CommitDate }}
2326
- -s -w
2427
- -linkmode=external
2528
- -extldflags '-Wl,-z,muldefs --static -lm'
@@ -41,6 +44,9 @@ builds:
4144
- -mod=readonly
4245
- -trimpath
4346
ldflags:
47+
- -X main.version={{ .Version }}
48+
- -X main.commit={{ .Commit }}
49+
- -X main.date={{ .CommitDate }}
4450
- -s -w
4551
- -linkmode=external
4652
- -extldflags '-Wl,-z,muldefs --static -lm'
@@ -62,6 +68,9 @@ builds:
6268
- -mod=readonly
6369
- -trimpath
6470
ldflags:
71+
- -X main.version={{ .Version }}
72+
- -X main.commit={{ .Commit }}
73+
- -X main.date={{ .CommitDate }}
6574
- -w -s
6675
- -linkmode=external
6776
tags:
@@ -81,6 +90,9 @@ builds:
8190
- -mod=readonly
8291
- -trimpath
8392
ldflags:
93+
- -X main.version={{ .Version }}
94+
- -X main.commit={{ .Commit }}
95+
- -X main.date={{ .CommitDate }}
8496
- -w -s
8597
- -linkmode=external
8698
tags:

0 commit comments

Comments
 (0)