diff --git a/Makefile.common b/Makefile.common index b978dfc50..9320176ca 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" diff --git a/RELEASE.md b/RELEASE.md index 1e49b36c9..f40a925e2 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -61,11 +61,9 @@ Maintaining the release branches for older minor releases happens on a best effo A few days before a major or minor release, consider updating the dependencies: ``` -export GO111MODULE=on -go get -u ./... -go mod tidy -go mod vendor +make update-go-deps git add go.mod go.sum vendor +git commit -m "Update dependencies" ``` Then create a pull request against the master branch.