Skip to content

Commit

Permalink
Set Version via ldflags for releases (#855)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonjohnsonjr committed Dec 1, 2020
1 parent 7c586d4 commit f937abd
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ builds:
- CGO_ENABLED=0
main: ./cmd/crane/main.go
binary: crane
flags:
- -trimpath
ldflags:
- "-s -w -X github.com/google/go-containerregistry/cmd/crane/cmd.Version={{.Version}}"
goarch:
- amd64
- arm
Expand All @@ -30,6 +34,10 @@ builds:
- CGO_ENABLED=0
main: ./cmd/gcrane/main.go
binary: gcrane
flags:
- -trimpath
ldflags:
- "-s -w -X github.com/google/go-containerregistry/cmd/crane/cmd.Version={{.Version}}"
goarch:
- amd64
- arm
Expand Down

0 comments on commit f937abd

Please sign in to comment.