diff options
author | Tobias Schmidt <tobidt@gmail.com> | 2020-06-02 23:45:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-02 23:45:24 +0200 |
commit | 2c433cdac30181ac078c8558dc43c5da42638c07 (patch) | |
tree | 1b31c7e85b301e919fe90189aebe6ccfa61e29db /Makefile | |
parent | 02532771213fcb024608043d7b1e514c1a80c2da (diff) | |
download | prometheus_node_collector-2c433cdac30181ac078c8558dc43c5da42638c07.tar.bz2 prometheus_node_collector-2c433cdac30181ac078c8558dc43c5da42638c07.tar.xz prometheus_node_collector-2c433cdac30181ac078c8558dc43c5da42638c07.zip |
Fix and simplify checkmetrics make target (#1731)
The checkmetrics target currently uses promtool v2.5.0 which doesn't
include many improvements done over the time. This change also
simplifies the promtool installation, avoiding a temporary directory by
extracting the file directly to the target destination.
Signed-off-by: Tobias Schmidt <tobidt@gmail.com>
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 8 |
1 files changed, 2 insertions, 6 deletions
@@ -19,7 +19,7 @@ DOCKER_ARCHS ?= amd64 armv7 arm64 ppc64le s390x | |||
19 | 19 | ||
20 | include Makefile.common | 20 | include Makefile.common |
21 | 21 | ||
22 | PROMTOOL_VERSION ?= 2.5.0 | 22 | PROMTOOL_VERSION ?= 2.18.1 |
23 | PROMTOOL_URL ?= https://github.com/prometheus/prometheus/releases/download/v$(PROMTOOL_VERSION)/prometheus-$(PROMTOOL_VERSION).$(GO_BUILD_PLATFORM).tar.gz | 23 | PROMTOOL_URL ?= https://github.com/prometheus/prometheus/releases/download/v$(PROMTOOL_VERSION)/prometheus-$(PROMTOOL_VERSION).$(GO_BUILD_PLATFORM).tar.gz |
24 | PROMTOOL ?= $(FIRST_GOPATH)/bin/promtool | 24 | PROMTOOL ?= $(FIRST_GOPATH)/bin/promtool |
25 | 25 | ||
@@ -129,9 +129,5 @@ test-docker: | |||
129 | promtool: $(PROMTOOL) | 129 | promtool: $(PROMTOOL) |
130 | 130 | ||
131 | $(PROMTOOL): | 131 | $(PROMTOOL): |
132 | $(eval PROMTOOL_TMP := $(shell mktemp -d)) | ||
133 | curl -s -L $(PROMTOOL_URL) | tar -xvzf - -C $(PROMTOOL_TMP) | ||
134 | mkdir -p $(FIRST_GOPATH)/bin | 132 | mkdir -p $(FIRST_GOPATH)/bin |
135 | cp $(PROMTOOL_TMP)/prometheus-$(PROMTOOL_VERSION).$(GO_BUILD_PLATFORM)/promtool $(FIRST_GOPATH)/bin/promtool | 133 | curl -fsS -L $(PROMTOOL_URL) | tar -xvzf - -C $(FIRST_GOPATH)/bin --no-anchored --strip 1 promtool |
136 | rm -r $(PROMTOOL_TMP) | ||
137 | |||