makefile: update Makefile.common with newer version

Signed-off-by: prombot <prometheus-team@googlegroups.com>
This commit is contained in:
prombot 2020-05-19 00:08:43 +00:00
parent bff02dd561
commit 6090117ca1
1 changed files with 11 additions and 0 deletions

View File

@ -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"