RELEASE.md
This file describes how to make the various kinds of releases
Early in the next release cycle update the dependencies.
make updatedirectmake GOTAGS=cmountmake compiletestgit commit -a -v -m "build: update all dependencies"If the make updatedirect upgrades the version of go in the go.mod
go 1.22.0
then so this instead make updatedirectnoupgrade. This will try each
upgrade individually. Consider making an upstream bug report for any
SKIPPING lines as these only support the latest Go version not the
previous version too.
If make updatedirect or make updatedirectnoupgrade added a
toolchain directive then remove it. We don't want to force a
toolchain on our users. Linux packagers are often using a version of
Go that is a few versions out of date.
Optionally upgrade the direct and indirect dependencies. This is very
likely to fail if make updatedirectnoupgrade was used.
make updatemake GOTAGS=cmountmake compiletestgit commit -a -v --amendgo.modNote 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.
Once it compiles locally, push it on a test branch and commit fixes until the tests pass.
Go makes pseudo versions for untagged repos and repos not at a tag. The pseudo versions on repos that have been tagged before do not get updated automatically so need manually checking. These can be found with
grep -E '[0-9]{14}-[0-9a-f]{12}' go.mod | grep -v indirect | grep -v 'v0\.0\.0'
These will need to be updated manually using the go get ...@branch
syntax.
The above procedure will not upgrade major versions, so v2 to v3. However this tool can show which major versions might need to be upgraded:
go run github.com/icholy/gomajor@latest list -major
Expect API breakage when updating major versions.
When a new Go stable is released update to it. We support the current stable Go and the previous release which is in line with the rest of the Go ecosystem.
These files will need editing:
.github/workflows/build.yml - change current and previous Go versionsdocs/content/install.md - change minimum Go version requiredfs/versioncheck.go - update minimum Go version requiredgo.mod - update minimum Go version requiredCheck it builds
make GOTAGS=cmountmake compiletestAssuming go1.XX is current and go1.YY is previous version:
Use git grep go1.YY and git grep go1.YY to look for opportunities
to remove build tags we no longer need.
Commit with message like this:
build: update to go1.YY and make go1.YY the minimum required version
Send to CI and if it passes, merge.
Updating the minimum required version of Go is a good opportunity to
run the go fix command to modernize Go usage.
This needs to be run for all architectures.
GOOS=linux go fix -tags cmount ./...
GOOS=freebsd go fix -tags cmount ./...
GOOS=windows go fix -tags cmount ./...
GOOS=darwin go fix -tags cmount ./...
Examine the diff carefully.
Commit with message
build: modernize Go code with go fix for go1.YY
At some point after the release run
bin/tidy-beta v1.55
where the version number is that of a couple ago to remove old beta binaries.
If rclone needs a point release due to some horrendous bug:
Set vars
First make the release branch. If this is a second point release then this will be done already.
Now
# cherry pick the changes to the changelog - check the diff to make sure it
is correctIf updating the website note that the sponsor logos have been moved out of the main repository.
You will need to checkout /docs/static/img/logos from https://github.com/rclone/third-party-logos
which is a private repo containing artwork from sponsors.
Create an update website branch based off the last release
git co -b update-website
If the branch already exists, double check there are no commits that need saving.
Now reset the branch to the last release
git reset --hard v1.64.0
Create the changes, check them in, test with make serve then
make upload_test_website
Check out https://test.rclone.org and when happy
make upload_website
Cherry pick any changes back to master and the stable branch if it is active.
To do a basic build of rclone's docker image to debug builds locally:
docker buildx build --load -t rclone/rclone:testing --progress=plain .
docker run --rm rclone/rclone:testing version
To test the multipatform build
docker buildx build -t rclone/rclone:testing --progress=plain --platform linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6 .
To make a full build then set the tags correctly and add --push
Note that you can't only build one architecture - you need to build them all.
docker buildx build --platform linux/amd64,linux/386,linux/arm64,linux/arm/v7,linux/arm/v6 -t rclone/rclone:1.54.1 -t rclone/rclone:1.54 -t rclone/rclone:1 -t rclone/rclone:latest --push .