Merge pull request #273316 from jpds/zfs-exporter-build-info-version

prometheus-zfs-exporter: Add version label to _build_info
This commit is contained in:
Maximilian Bosch 2023-12-16 16:26:20 +01:00 committed by GitHub
commit 56d4255ce9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -16,6 +16,16 @@ buildGoModule rec {
vendorHash = "sha256-uIilESEmAxANxFOy7qvYxlF/bId/Kqh4jUspNknlhlc=";
ldflags = [
"-s"
"-w"
"-X github.com/prometheus/common/version.Version=${version}"
"-X github.com/prometheus/common/version.Revision=unknown"
"-X github.com/prometheus/common/version.Branch=unknown"
"-X github.com/prometheus/common/version.BuildUser=nix@nixpkgs"
"-X github.com/prometheus/common/version.BuildDate=unknown"
];
postInstall = ''
install -Dm444 -t $out/share/doc/${pname} *.md
'';