Skip to content

Commit

Permalink
build: set version ldflag
Browse files Browse the repository at this point in the history
  • Loading branch information
aripalo committed Apr 7, 2022
1 parent de78855 commit 59f0fa7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ before:
- go generate ./...
builds:
- main: ./main.go
# Custom ldflags templates.
# Default is `-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}} -X main.builtBy=goreleaser`.
ldflags:
- -s -w -X cmd.version={{.Version}}
env:
- CGO_ENABLED=0
goos:
Expand Down

0 comments on commit 59f0fa7

Please sign in to comment.