mirror of
https://github.com/prometheus/prometheus.git
synced 2024-12-25 05:34:05 -08:00
Makefile.common: add 'update-go-deps' target (#7259)
* Makefile.common: add 'update-deps' target Also updated the RELEASE.md document to adjust the instructions about dependencies management. Signed-off-by: Simon Pasquier <spasquie@redhat.com> * Rename udpdate-deps -> update-go-deps Signed-off-by: Simon Pasquier <spasquie@redhat.com> * Remove use of jq Signed-off-by: Simon Pasquier <spasquie@redhat.com> * Use $(GO) instead of literal "go" Signed-off-by: Simon Pasquier <spasquie@redhat.com>
This commit is contained in:
parent
6e19c4697d
commit
44cdd3e768
|
@ -150,6 +150,17 @@ else
|
||||||
$(GO) get $(GOOPTS) -t ./...
|
$(GO) get $(GOOPTS) -t ./...
|
||||||
endif
|
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
|
.PHONY: common-test-short
|
||||||
common-test-short: $(GOTEST_DIR)
|
common-test-short: $(GOTEST_DIR)
|
||||||
@echo ">> running short tests"
|
@echo ">> running short tests"
|
||||||
|
|
|
@ -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:
|
A few days before a major or minor release, consider updating the dependencies:
|
||||||
|
|
||||||
```
|
```
|
||||||
export GO111MODULE=on
|
make update-go-deps
|
||||||
go get -u ./...
|
|
||||||
go mod tidy
|
|
||||||
go mod vendor
|
|
||||||
git add go.mod go.sum vendor
|
git add go.mod go.sum vendor
|
||||||
|
git commit -m "Update dependencies"
|
||||||
```
|
```
|
||||||
|
|
||||||
Then create a pull request against the master branch.
|
Then create a pull request against the master branch.
|
||||||
|
|
Loading…
Reference in a new issue