Skip to content

Commit 6301a20

Browse files
author
Amanjeev Sethi
committed
README update with cutting a release
1 parent 1c3db8a commit 6301a20

File tree

2 files changed

+62
-5
lines changed

2 files changed

+62
-5
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@
55

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

8+
## [Unreleased]
9+
10+
### Added
11+
12+
- Release instructions to README.
13+
814
## [1.2.0] - 2024-11-25
915

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

6975
[Unreleased]: https://github.com/ferrocene/criticalup/compare/v1.2.0...HEAD
76+
7077
[1.2.0]: https://github.com/ferrocene/criticalup/compare/v1.1.0...v1.2.0
78+
7179
[1.1.0]: https://github.com/ferrocene/criticalup/compare/v1.1.0...v1.0.2
80+
7281
[1.0.2]: https://github.com/ferrocene/criticalup/compare/v1.0.1...v1.0.2
82+
7383
[1.0.1]: https://github.com/ferrocene/criticalup/compare/v1.0.0...v1.0.1
84+
7485
[1.0.0]: https://github.com/ferrocene/criticalup/compare/v1.0.0...v1.0.0-prerelease.1

README.md

Lines changed: 51 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,23 @@
55

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

8-
> [!NOTE]
8+
> [!NOTE]
99
>
1010
> For normal usage and binary installation, please consult the [CriticalUp Documentation][criticalup-docs].
1111
12-
# Installing
12+
## Installing
1313

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

17+
## Development
1618

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

19-
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.
22+
### Build
23+
24+
#### Debug
2025

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

@@ -30,19 +35,60 @@ To build a debug version of the production-targeting CriticalUp:
3035
cargo build -p criticalup
3136
```
3237

38+
#### Release
39+
3340
To build a release version:
3441

3542
```bash
3643
cargo build -p criticalup --release
3744
```
3845

46+
### Test
47+
3948
To test CriticalUp:
4049

4150
```bash
4251
cargo test
4352
```
4453

54+
## Releasing a new version
55+
56+
We use [`cargo-dist`](https://opensource.axo.dev/cargo-dist/book/quickstart/rust.html) to publish releases.
57+
58+
To cut a release:
59+
60+
- Update the `main` branch with latest changes.
61+
- Create and checkout a new release branch from `main` with name like `release/vX.Y.Z`.
62+
Where, X.Y.Z is the release version you are targeting.
63+
- Update the following on the release branch
64+
- [dist-workspace.toml](./dist-workspace.toml): Change `pr-run-mode = "plan"` to `pr-run-mode = "upload"`.
65+
**Commit this change separately!** (We will need to revert this commit once the PR passes.)
66+
- [crates/criticalup/Cargo.toml](./crates/criticalup/Cargo.toml): Change `version` to `X.Y.Z`.
67+
- [crates/criticalup-cli/Cargo.toml](./crates/criticalup-cli/Cargo.toml): Change `version` to `X.Y.Z`.
68+
- [crates/criticalup-dev/Cargo.toml](./crates/criticalup-dev/Cargo.toml): Change `version` to `X.Y.Z`.
69+
- [crates/criticalup-cli/tests/snapshots/cli__root__version_flags.snap](./crates/criticalup-cli/tests/snapshots/cli__root__version_flags.snap):
70+
Update this test to match the correct version (`X.Y.Z`).
71+
- [CHANGELOG.md](./CHANGELOG.md): Make `[Unreleased]` the correct version (`[X.Y.Z]`). Add correct links metadata at
72+
the bottom.
73+
- Commit and push this branch and open a PR against `main`.
74+
- If the full CI test cycle on the PR passes, drop the [dist-workspace.toml](./dist-workspace.toml) commit from above
75+
and push.
76+
- Wait for approval(s) from reviewer(s).
77+
- Once the PR is approved, comment `bors merge` to merge the PR.
78+
- After the PR is merged, checkout `main` branch and update it with the latest changes.
79+
- Create a tag `git tag 'vX.Y.Z'`.
80+
- Push the tag `git push origin vX.Y.Z`. This should trigger the release build in GitHub Actions and publish the release
81+
on its own.
82+
83+
If the release build fails:
84+
85+
- Revert the changes from `release/vX.Y.Z` and open a PR to be merged to `main`.
86+
- Delete the tag from GH.
87+
4588
[criticalup-docs]: https://criticalup.ferrocene.dev/
89+
4690
[rustup]: https://github.com/rust-lang/rustup
91+
4792
[ferrocene]: https://ferrocene.dev/
93+
4894
[rust-install]: https://www.rust-lang.org/tools/install

0 commit comments

Comments
 (0)