build: more docs on upgrading dependencies

This commit is contained in:
Nick Craig-Wood 2021-11-10 10:33:48 +00:00
parent 7366e97dfc
commit 71b8e1e80b
2 changed files with 20 additions and 5 deletions

View File

@ -104,10 +104,14 @@ showupdates:
@echo "*** Direct dependencies that could be updated ***" @echo "*** Direct dependencies that could be updated ***"
@GO111MODULE=on go list -u -f '{{if (and (not (or .Main .Indirect)) .Update)}}{{.Path}}: {{.Version}} -> {{.Update.Version}}{{end}}' -m all 2> /dev/null @GO111MODULE=on go list -u -f '{{if (and (not (or .Main .Indirect)) .Update)}}{{.Path}}: {{.Version}} -> {{.Update.Version}}{{end}}' -m all 2> /dev/null
# Update direct dependencies only
updatedirect:
GO111MODULE=on go get -d $$(go list -m -f '{{if not (or .Main .Indirect)}}{{.Path}}{{end}}' all)
GO111MODULE=on go mod tidy
# Update direct and indirect dependencies and test dependencies # Update direct and indirect dependencies and test dependencies
update: update:
GO111MODULE=on go get -u -t ./... GO111MODULE=on go get -d -u -t ./...
-#GO111MODULE=on go get -d $(go list -m -f '{{if not (or .Main .Indirect)}}{{.Path}}{{end}}' all)
GO111MODULE=on go mod tidy GO111MODULE=on go mod tidy
# Tidy the module dependencies # Tidy the module dependencies

View File

@ -34,13 +34,24 @@ This file describes how to make the various kinds of releases
* make startdev # make startstable for stable branch * make startdev # make startstable for stable branch
* # announce with forum post, twitter post, patreon post * # announce with forum post, twitter post, patreon post
## Update dependencies
Early in the next release cycle update the dependencies Early in the next release cycle update the dependencies
* Review any pinned packages in go.mod and remove if possible * Review any pinned packages in go.mod and remove if possible
* make update * make updatedirect
* git status * make
* git add new files
* git commit -a -v * git commit -a -v
* make update
* make
* roll back any updates which didn't compile
* git commit -a -v --amend
Note that `make update` updates all direct and indirect dependencies
and there can occasionally be forwards compatibility problems with
doing that so it may be necessary to roll back dependencies to the
version specified by `make updatedirect` in order to get rclone to
build.
## Making a point release ## Making a point release