Skip to content

Commit 3bb9618

Browse files
authored
Merge pull request #756 from prometheus/makefile_common
Synchronize Makefile.common from prometheus/prometheus
2 parents 150f921 + 6090117 commit 3bb9618

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

Makefile.common

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,17 @@ else
150150
$(GO) get $(GOOPTS) -t ./...
151151
endif
152152

153+
.PHONY: update-go-deps
154+
update-go-deps:
155+
@echo ">> updating Go dependencies"
156+
@for m in $$($(GO) list -mod=readonly -m -f '{{ if and (not .Indirect) (not .Main)}}{{.Path}}{{end}}' all); do \
157+
$(GO) get $$m; \
158+
done
159+
GO111MODULE=$(GO111MODULE) $(GO) mod tidy
160+
ifneq (,$(wildcard vendor))
161+
GO111MODULE=$(GO111MODULE) $(GO) mod vendor
162+
endif
163+
153164
.PHONY: common-test-short
154165
common-test-short: $(GOTEST_DIR)
155166
@echo ">> running short tests"

0 commit comments

Comments
 (0)