Skip to content

Commit b34dee4

Browse files
committed
Add version injection using ldflags in .goreleaser.yml for dynamic versioning
1 parent 26fab96 commit b34dee4

File tree

1 file changed

+7
-11
lines changed

1 file changed

+7
-11
lines changed

.goreleaser.yml

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,28 @@
1+
version: 2
2+
13
builds:
24
- binary: oshiv
5+
id: oshiv
36
goos:
47
- darwin
58
- linux
9+
- windows
610
goarch:
711
- amd64
812
- arm64
913
env:
1014
- CGO_ENABLED=0
1115
flags:
1216
- -mod=vendor
17+
ldflags:
18+
- "-s -w -X 'github.com/cnopslabs/oshiv/cmd.version={{.Version}}'"
19+
1320

1421
release:
1522
prerelease: auto
1623

1724
universal_binaries:
1825
- replace: true
1926

20-
brews:
21-
-
22-
name: askcloudhelloworld
23-
homepage: https://github.com/cnopslabs/oshiv
24-
tap:
25-
owner: cnopslabs
26-
name: homebrew-cnopslabs
27-
commit_author:
28-
name: rozdolsky33
29-
email: rozdolskyvolodymyr@gmail.com
30-
3127
checksum:
3228
name_template: 'checksums.txt'

0 commit comments

Comments
 (0)