Browse Source

Update prometheus to 2.9.2 and use Go modules build

master
Andreas Linz 1 year ago
parent
commit
c4e784c39e
Signed by: alinz GPG Key ID: 9BF39809C9DA580C
1 changed files with 12 additions and 6 deletions
  1. +12
    -6
      build/prometheus/Makefile

+ 12
- 6
build/prometheus/Makefile View File

@ -1,14 +1,20 @@
.PHONY: clean
VERSION:=2.7.1
VERSION :=v2.9.2
PROMETHEUS_SRC :=prometheus-src-$(VERSION)
all: prometheus
prometheus: $(PROMETHEUS_SRC) checkout-version
cd $(PROMETHEUS_SRC) && go build -o ../$@ github.com/prometheus/prometheus/cmd/prometheus
cp -r $(PROMETHEUS_SRC)/documentation/examples/prometheus.yml $@.yml
prometheus: prometheus-$(VERSION).linux-amd64.tar.gz
tar --strip-components 1 -xvf $< -- prometheus-$(VERSION).linux-amd64/$@ prometheus-$(VERSION).linux-amd64/$@.yml
$(PROMETHEUS_SRC):
git clone https://github.com/prometheus/prometheus.git $@
prometheus-$(VERSION).linux-amd64.tar.gz:
curl -Lsf 'https://github.com/prometheus/prometheus/releases/download/v$(VERSION)/prometheus-$(VERSION).linux-amd64.tar.gz' > $@
checkout-version: $(PROMETHEUS_SRC)
cd $(PROMETHEUS_SRC) && git checkout --force --quiet $(VERSION)
clean:
rm -f prometheus "prometheus-*.tar.gz"
rm -f "prometheus*"
rm -rf "prometheus-src*"

Loading…
Cancel
Save