Merge pull request #131573 from Ma27/prom-mysqld-versioninfo

prometheus-mysqld-exporter: add version info
This commit is contained in:
Maximilian Bosch 2021-07-26 23:07:35 +02:00 committed by GitHub
commit a3c5343fe6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,6 +14,15 @@ buildGoModule rec {
vendorSha256 = "19785rfzlx8h0h8vmg0ghd40h3p4y6ikhgf8rd2qfj5f6qxfhrgv";
buildFlagsArray = let t = "github.com/prometheus/common/version"; in ''
-ldflags=
-s -w -X ${t}.Version=${version}
-X ${t}.Revision=${rev}
-X ${t}.Branch=unknown
-X ${t}.BuildUser=nix@nixpkgs
-X ${t}.BuildDate=unknown
'';
# skips tests with external dependencies, e.g. on mysqld
checkFlags = [ "-short" ];