From: PrometheusBot Date: Tue, 19 May 2020 08:23:22 +0000 (+0300) Subject: makefile: update Makefile.common with newer version (#627) X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=7fdd3b777f536ccb1752704c5d68aa45e8ad6457;p=blackbox_exporter.git makefile: update Makefile.common with newer version (#627) Signed-off-by: prombot --- diff --git a/Makefile.common b/Makefile.common index b978dfc..9320176 100644 --- a/Makefile.common +++ b/Makefile.common @@ -150,6 +150,17 @@ else $(GO) get $(GOOPTS) -t ./... endif +.PHONY: update-go-deps +update-go-deps: + @echo ">> updating Go dependencies" + @for m in $$($(GO) list -mod=readonly -m -f '{{ if and (not .Indirect) (not .Main)}}{{.Path}}{{end}}' all); do \ + $(GO) get $$m; \ + done + GO111MODULE=$(GO111MODULE) $(GO) mod tidy +ifneq (,$(wildcard vendor)) + GO111MODULE=$(GO111MODULE) $(GO) mod vendor +endif + .PHONY: common-test-short common-test-short: $(GOTEST_DIR) @echo ">> running short tests"