ping_exporter
ping_exporter copied to clipboard
Set version via -ldflags
This automates tagging/building a bit and removes duplication.
Goreleaser, by default, adds versioning information to the go build
and go release
call:
$ goreleaser build --rm-dist --single-target --snapshot
...
• getting and validating git state
• releasing 0.4.7, commit d20774f4fa356511f93c7c5f0a8501117ddf1114
...
$ artifacts/ping_exporter_linux_amd64/ping_exporter --version
ping-exporter
Version: 0.4.7-SNAPSHOT-d20774f
Author(s): Philip Berndroth, Daniel Czerwonk
Metric exporter for go-icmp