|
| 1 | +# Contribution and Maintenance notes |
| 2 | + |
| 3 | +## Contributing |
| 4 | + |
| 5 | +Pull Requests and issue reports are very welcome! |
| 6 | + |
| 7 | +If you are unsure whether something would make a good contribution (or you aren't sure how to |
| 8 | +tackle something), feel free to either open an issue to solicit feedback or chat with us at |
| 9 | +[`#nrf-rs:matrix.org`]. This is preferred over opening a big PR that might then not get merged. |
| 10 | + |
| 11 | +If a Pull Request has not been reviewed for a long time, feel free to ping the maintainers. |
| 12 | + |
| 13 | +## Breaking Changes |
| 14 | + |
| 15 | +Since the HAL still evolves rapidly, most releases contain breaking changes, and there is generally |
| 16 | +no requirement that Pull Requests avoid them. |
| 17 | + |
| 18 | +If some fix is intended to be included in a patch release, breaking changes should be avoided. |
| 19 | +Otherwise it can not be included in a patch release and has to wait until the next major release. |
| 20 | + |
| 21 | +Note that we do not backport bugfixes, so once any breaking change has landed, future bug fixes, |
| 22 | +even if not breaking changes by themselves, will only be included in the next major release. |
| 23 | + |
| 24 | +## Release process |
| 25 | + |
| 26 | +In order to release a new version of the HALs, the following steps need to be performed: |
| 27 | + |
| 28 | +* **Changelog**: Update [the changelog](./CHANGELOG.md) to list all notable changes under the `Unreleased` |
| 29 | + section. |
| 30 | + * You can use GitHub's "compare" feature to view all commits added since the last release. Go to |
| 31 | + <https://github.com/nrf-rs/nrf-hal/releases/>, select the latest release, and click the link |
| 32 | + "N commits to master since this release". |
| 33 | +* **Version Bump**: Determine whether the next release contains breaking changes. This informs what |
| 34 | + kind of version bump is needed (minor vs. major). Then, bump the crate versions accordingly. |
| 35 | + Because of the large number of crates, we use [`cargo-xtask`]-based automation to bump all version |
| 36 | + numbers. Invoke it via `cargo xtask bump <new-version>` to update all version numbers to |
| 37 | + `<new-version>`. |
| 38 | +* **Pull Request**: Open a Pull Request with the version bump and merge it once CI passes. |
| 39 | +* **Tag**: Run `git pull`, and tag the release by running `git tag -a -m 'vX.Y.Z' 'vX.Y.Z'`, |
| 40 | + replacing `X.Y.Z` with the version you bumped to. Run `git push --tags origin`. |
| 41 | +* **Publish**: Publish all HAL crates to crates.io, starting with `nrf-hal-common`. For that crate, |
| 42 | + you have to pass `--no-verify` to `cargo publish`, since the crate only builds with specific |
| 43 | + Cargo features. The examples should not be published. |
| 44 | +* **GitHub Release**: Go to <https://github.com/nrf-rs/nrf-hal/releases> and click the tag you just |
| 45 | + pushed. Click *Edit Tag* and paste the changelog entries for the new version (no *Release Title* |
| 46 | + is necessary). Click *Publish Release*. |
| 47 | +* **Annoucement**: Post a link to the GitHub release in [`#nrf-rs:matrix.org`] and any other places |
| 48 | + you'd like to announce it. |
| 49 | + |
| 50 | +[`cargo-xtask`]: https://github.com/matklad/cargo-xtask/ |
| 51 | +[`#nrf-rs:matrix.org`]: https://matrix.to/#/#nrf-rs:matrix.org |
0 commit comments