Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README update with cutting a release #70

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@

All notable changes to this project will be documented in this file.

## [Unreleased]

### Added

- Release instructions to README.

## [1.2.0] - 2024-11-25

### Changed
Expand Down Expand Up @@ -67,8 +73,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

[Unreleased]: https://github.com/ferrocene/criticalup/compare/v1.2.0...HEAD

[1.2.0]: https://github.com/ferrocene/criticalup/compare/v1.1.0...v1.2.0

[1.1.0]: https://github.com/ferrocene/criticalup/compare/v1.1.0...v1.0.2

[1.0.2]: https://github.com/ferrocene/criticalup/compare/v1.0.1...v1.0.2

[1.0.1]: https://github.com/ferrocene/criticalup/compare/v1.0.0...v1.0.1

[1.0.0]: https://github.com/ferrocene/criticalup/compare/v1.0.0...v1.0.0-prerelease.1
58 changes: 53 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,23 @@

Criticalup is a toolchain manager for [Ferrocene][ferrocene], similar to [`rustup`][rustup].

> [!NOTE]
> [!NOTE]
>
> For normal usage and binary installation, please consult the [CriticalUp Documentation][criticalup-docs].

# Installing
## Installing

Installation instructions for CriticalUp are included in [each release](https://github.com/ferrocene/criticalup/releases) as well as the [documentation][criticalup-docs].
Installation instructions for CriticalUp are included
in [each release](https://github.com/ferrocene/criticalup/releases) as well as the [documentation][criticalup-docs].

## Development

# Development
CriticalUp only requires a working Rust and C toolchain to build. [Installation instructions][rust-install] for Rust
typically include installing a C toolchain as well.

CriticalUp only requires a working Rust and C toolchain to build. [Installation instructions][rust-install] for Rust typically include installing a C toolchain as well.
### Build

#### Debug

To build a debug version of the development-targeting CriticalUp:

Expand All @@ -30,19 +35,62 @@ To build a debug version of the production-targeting CriticalUp:
cargo build -p criticalup
```

#### Release

To build a release version:

```bash
cargo build -p criticalup --release
```

### Test

To test CriticalUp:

```bash
cargo test
```

## Releasing a new version

We use [`cargo-dist`](https://opensource.axo.dev/cargo-dist/book/quickstart/rust.html) to publish releases.

To cut a release:

- Update the `main` branch with latest changes.
amanjeev marked this conversation as resolved.
Show resolved Hide resolved
- 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
- [dist-workspace.toml](./dist-workspace.toml): Change `pr-run-mode = "plan"` to `pr-run-mode = "upload"`.
amanjeev marked this conversation as resolved.
Show resolved Hide resolved
**Commit this change separately!** (We will need to drop this commit once the PR passes)
- [crates/criticalup/Cargo.toml](./crates/criticalup/Cargo.toml): Change `version` to `X.Y.Z`.
- [crates/criticalup-cli/Cargo.toml](./crates/criticalup-cli/Cargo.toml): Change `version` to `X.Y.Z`.
- [crates/criticalup-dev/Cargo.toml](./crates/criticalup-dev/Cargo.toml): Change `version` to `X.Y.Z`.
- [crates/criticalup-cli/tests/snapshots/cli__root__version_flags.snap](./crates/criticalup-cli/tests/snapshots/cli__root__version_flags.snap):
Update this test to match the correct version (`X.Y.Z`).
- [CHANGELOG.md](./CHANGELOG.md): Make `[Unreleased]` the correct version (`[X.Y.Z]`). Add correct links metadata at
the bottom.
- Run `cargo test --workspace` and `cargo 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](./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 to `main`.
- Delete the tag from GitHub.

[criticalup-docs]: https://criticalup.ferrocene.dev/

[rustup]: https://github.com/rust-lang/rustup

[ferrocene]: https://ferrocene.dev/

[rust-install]: https://www.rust-lang.org/tools/install
Loading