prometheus-dnssec-exporter/Makefile

21 lines
905 B
Makefile
Raw Permalink Normal View History

2022-10-14 02:02:08 +02:00
PDE_VERSION=$$(git describe --tags --dirty | sed -re s/^v// | cut -d- -f1)
PDE_REVISION=$$(git describe --tags --dirty | cut -d- -f2-)
2022-10-14 02:19:41 +02:00
LD_VERSION=-X 'github.com/prometheus/common/version.Version=$(PDE_VERSION)'
LD_REVISION=-X 'github.com/prometheus/common/version.Revision=$(PDE_REVISION)'
2022-10-14 02:35:45 +02:00
LD_BRANCH=-X 'github.com/prometheus/common/version.Branch=$(CI_COMMIT_REF_NAME)'
2022-10-14 02:19:41 +02:00
LD_USER=-X 'github.com/prometheus/common/version.BuildUser=$$(whoami)@$$(hostname -f)'
LD_DATE=-X 'github.com/prometheus/common/version.BuildDate=$$(date --iso-8601=seconds)'
2022-10-14 02:02:08 +02:00
LDFLAGS=-s $(LD_VERSION) $(LD_REVISION) $(LD_BRANCH) $(LD_USER) $(LD_DATE)
prometheus-dnssec-exporter:
go build -tags netgo -ldflags="$(LDFLAGS)" -o prometheus-dnssec-exporter
./prometheus-dnssec-exporter --version
2022-10-14 02:02:08 +02:00
.changes:
git log --format='- %s' $$(git describe --tags --abbrev=0 @^)..@ > .changes
clean:
rm -f prometheus-dnssec-exporter .changes