mirror of https://github.com/hashicorp/consul
Backport of [NET-6741] make: Add target for updating dependencies across all modules into release/1.17.x (#20685)
backport of commit 6f0e24cda7
Co-authored-by: Michael Zalimeni <michael.zalimeni@hashicorp.com>
pull/20689/head
parent
e16af25e7c
commit
7451c3db2a
13
Makefile
13
Makefile
|
@ -237,6 +237,19 @@ go-mod-tidy/%:
|
||||||
@echo "--> Running go mod tidy ($*)"
|
@echo "--> Running go mod tidy ($*)"
|
||||||
@cd $* && go mod tidy
|
@cd $* && go mod tidy
|
||||||
|
|
||||||
|
.PHONY: go-mod-get
|
||||||
|
go-mod-get: $(foreach mod,$(GO_MODULES),go-mod-get/$(mod)) ## Run go get and go mod tidy in every module for the given dependency
|
||||||
|
|
||||||
|
.PHONY: go-mod-get/%
|
||||||
|
go-mod-get/%:
|
||||||
|
ifndef DEP_VERSION
|
||||||
|
$(error DEP_VERSION is undefined: set this to <dependency>@<version>, e.g. github.com/hashicorp/go-hclog@v1.5.0)
|
||||||
|
endif
|
||||||
|
@echo "--> Running go get ${DEP_VERSION} ($*)"
|
||||||
|
@cd $* && go get $(DEP_VERSION)
|
||||||
|
@echo "--> Running go mod tidy ($*)"
|
||||||
|
@cd $* && go mod tidy
|
||||||
|
|
||||||
##@ Checks
|
##@ Checks
|
||||||
|
|
||||||
.PHONY: fmt
|
.PHONY: fmt
|
||||||
|
|
Loading…
Reference in New Issue