doc/dev-guide/src/release-process.md
Before making a release, ensure that rustup-init.sh is behaving correctly,
and that you're satisfied that nothing in the ecosystem is breaking because
of the update. A useful set of things to check includes verifying that
real-world toolchains install okay, and that rust-analyzer isn't broken by
the release. While it's not our responsibility if they depend on non-stable
APIs, we should behave well if we can.
As a maintainer, you have two options to choose from when cutting a new
release: a beta release or an official release.
The main difference between the two is that they use different values for
the RUSTUP_UPDATE_ROOT environment variable:
https://dev-static.rust-lang.org/rustup.https://static.rust-lang.org/rustup.By switching between those two values, Rustup effectively provides two "self
update channels", making beta testing possible with rustup self update.
Producing the final release artifacts is a bit involved because of the way Rustup is distributed. Below is a list of things to be done in order to cut a new [b]eta release or an official [r]elease:
Cargo.tomls haven't been updated:
$VER_NUM should be.
Note: We always increment the minor number unless:
- A major incompatibility has been introduced in this release: increment the major number instead.
- This release is a hotfix because the last one had a defect: increment the patch number instead.
Cargo.toml and download/Cargo.toml to have that same new
version number, then run cargo build and review Cargo.lock changes.CHANGELOG.md accordingly if necessary.rustup-init.sh so that:
$VER_NUM.main.rustup-init.sh --help.
At the moment of writing, this is done by running:
$ SNAPSHOTS=overwrite cargo test --features=test -- cli_rustup_init_ui
main to stable using
--ff-only:
git fetch origin main:maingit checkout stable && git merge --ff-only maingit push origin HEAD:stablestable, double-check the
functionality of rustup-init.sh and rustup-init just in case.stable branch.
Once it is, check through a representative proportion of the builds looking
for the reported version statements to ensure that
we definitely built something cleanly which reports as the right version
number when run --version.ci/sync-dist.py.
Note: Some manual testing occurs here, so hopefully they'll catch anything egregious in which case abort the change and roll back.
stable commit.
git tag -as $VER_NUM -m $VER_NUM (optionally without -s if not GPG
signing the tag)git push origin $VER_NUM