Skip to content

Commit

Permalink
Add ldflags for version information
Browse files Browse the repository at this point in the history
Signed-off-by: Utku Ozdemir <uoz@protonmail.com>
  • Loading branch information
utkuozdemir committed Jun 21, 2021
1 parent 0b2f877 commit 3e90e94
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ builds:
- id: nvidia_gpu_exporter
main: ./cmd/nvidia_gpu_exporter
binary: nvidia_gpu_exporter
ldflags:
- -s -w
- -X github.com/prometheus/common/version.Version={{.Version}}
- -X github.com/prometheus/common/version.Revision={{.Commit}}
- -X github.com/prometheus/common/version.Branch={{.Branch}}
- -X github.com/prometheus/common/version.BuildUser=goreleaser
- -X github.com/prometheus/common/version.BuildDate={{.Date}}
env:
- CGO_ENABLED=0
goos:
Expand Down

0 comments on commit 3e90e94

Please sign in to comment.