PMM-11312 --version (#92)

This commit is contained in:
Yaroslav Podorvanov 2023-01-17 00:27:53 +02:00 committed by GitHub
parent 8140ab3e39
commit cbde0a51c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,3 +8,10 @@ DOCKER_REPO ?= prometheuscommunity
include Makefile.common
DOCKER_IMAGE_NAME ?= postgres-exporter
GO_BUILD_LDFLAGS = -X github.com/prometheus/common/version.Version=$(shell cat VERSION) -X github.com/prometheus/common/version.Revision=$(shell git rev-parse HEAD) -X github.com/prometheus/common/version.Branch=$(shell git describe --always --contains --all) -X github.com/prometheus/common/version.BuildUser= -X github.com/prometheus/common/version.BuildDate=$(shell date +%FT%T%z) -s -w
export PMM_RELEASE_PATH?=.
release:
go build -ldflags="$(GO_BUILD_LDFLAGS)" -o $(PMM_RELEASE_PATH)/postgres_exporter ./cmd/postgres_exporter