Criticalup is a toolchain manager for Ferrocene, similar to rustup
.
Note
For normal usage and binary installation, please consult the CriticalUp Documentation.
Installation instructions for CriticalUp are included in each release as well as the documentation.
CriticalUp only requires a working Rust and C toolchain to build. Installation instructions for Rust typically include installing a C toolchain as well.
To build a debug version of the development-targeting CriticalUp:
cargo build -p criticalup-dev
To build a debug version of the production-targeting CriticalUp:
cargo build -p criticalup
To build a release version:
cargo build -p criticalup --release
To test CriticalUp:
cargo test
We use cargo-dist
to publish releases.
To cut a release:
git pull
on themain
branch for latest changes.- Create and checkout a new release branch from
main
, use the naming convention -release/vX.Y.Z
. Where,X.Y.Z
is the release version you are trying to release. - Update the following on the release branch
- crates/criticalup/Cargo.toml: Change
version
toX.Y.Z
. - crates/criticalup-cli/Cargo.toml: Change
version
toX.Y.Z
. - crates/criticalup-dev/Cargo.toml: Change
version
toX.Y.Z
. - crates/criticalup-cli/tests/snapshots/cli__root__version_flags.snap:
Update this test to match the correct version (
X.Y.Z
). - CHANGELOG.md: Make
[Unreleased]
the correct version ([X.Y.Z]
). Add correct links metadata at the bottom. - dist-workspace.toml: Change
pr-run-mode = "plan"
topr-run-mode = "upload"
. Commit this change separately! (We will need to drop this commit once the PR passes)
- crates/criticalup/Cargo.toml: Change
- Run
cargo test --workspace
andcargo clippy --workspace --tests --locked -- -Dwarnings
to make sure there no failures. - Commit and push this branch and open a PR against
main
, on GitHub. - If the full CI test cycle on the PR passes and the reviewer(s) are OK, drop the dist-workspace.toml commit from above and push.
- Wait for approval(s) from reviewer(s).
- Once the PR is approved, comment
bors merge
to merge the PR. - After the PR is merged, checkout
main
branch and update it (git pull
) with the latest changes. - Create a tag
git tag 'vX.Y.Z'
. - Push the tag
git push origin vX.Y.Z
. This should trigger the release build in GitHub Actions and publish the release on its own.
If the release build fails:
- Revert the changes from
release/vX.Y.Z
and open a PR to be merged tomain
. - Delete the tag from GitHub.