Closed britcey closed 4 years ago
Hi @britcey, thanks for pointing this out!
It seems like the issue here is that the Makefile uses promu
(the prometheus build tool) to generate binaries whereas the release process uses goreleaser. The former injects the version information into the binary, while the latter (currently) does not.
I should really standardise the build process to avoid these differences. Watch this space.
If it helps, I happened to have built node_exporter w/o using promu and figured out how to hack in that info - from my Makefile:
LDFLAGS := -X github.com/prometheus/common/version.Version=$(VERSION) \
-X github.com/prometheus/common/version.Revision=$(REVISION) \
-X github.com/prometheus/common/version.Branch=$(BRANCH) \
-X github.com/prometheus/common/version.BuildUser=foo@example.com \
-X github.com/prometheus/common/version.BuildDate=$(shell date +%Y%m%d-%H:%M:%S) \
go build -ldflags "$(LDFLAGS)"
HTH
Fixed in v1.0.1.
A minor issue, but the pre-built binaries don't include release info:
Building locally does the right thing:
So not sure what's being missed in the release process.
Thanks for this useful exporter!