2021-11-03 20:19:22 +08:00
|
|
|
# Release process
|
2017-09-13 00:36:19 +08:00
|
|
|
|
2022-01-11 23:32:25 +08:00
|
|
|
This page describes the release process used with MCUboot.
|
2017-09-13 00:36:19 +08:00
|
|
|
|
|
|
|
## Version numbering
|
|
|
|
|
|
|
|
MCUboot uses [semantic versioning][semver], where version numbers
|
2022-01-11 23:32:25 +08:00
|
|
|
follow a `MAJOR.MINOR.PATCH` format with the following guidelines on
|
|
|
|
incrementing the numbers:
|
2017-09-13 00:36:19 +08:00
|
|
|
|
2022-01-11 23:32:25 +08:00
|
|
|
1. MAJOR version when there are incompatible API changes.
|
|
|
|
2. MINOR version when new functionalities were added in a
|
|
|
|
backward-compatible manner.
|
|
|
|
3. PATCH version when there are backward-compatible bug fixes.
|
2017-09-13 00:36:19 +08:00
|
|
|
|
2022-01-11 23:32:25 +08:00
|
|
|
We add pre-release tags using the format `MAJOR.MINOR.PATCH-rc1`.
|
2017-09-13 00:36:19 +08:00
|
|
|
|
2022-01-11 23:32:25 +08:00
|
|
|
In the documentation, we mark an MCUBoot development version using the
|
|
|
|
format `MAJOR.MINOR.PATCH-dev`.
|
2020-10-30 19:17:59 +08:00
|
|
|
|
2021-11-03 20:19:22 +08:00
|
|
|
## Release notes
|
2017-09-13 02:07:45 +08:00
|
|
|
|
2022-01-11 23:32:25 +08:00
|
|
|
Before making a release, update the `docs/release-notes.md` file
|
|
|
|
to describe the release. This should be a high-level description of
|
2017-09-13 02:07:45 +08:00
|
|
|
the changes, not a list of the git commits.
|
|
|
|
|
2021-11-03 20:19:22 +08:00
|
|
|
## Release candidates
|
2017-09-13 00:36:19 +08:00
|
|
|
|
2022-01-11 23:32:25 +08:00
|
|
|
Before each release, tags are made (see below) for at least one
|
|
|
|
release candidate (a.b.c-rc1, followed by a.b.c-rc2 and the subsequent
|
|
|
|
release candidates, followed by the official a.b.c release). The intent
|
|
|
|
is to freeze the code and allow testing.
|
2017-09-13 00:36:19 +08:00
|
|
|
|
2022-01-11 23:32:25 +08:00
|
|
|
During the time between the rc1 and the final release, the only changes
|
|
|
|
that should be merged into the main branch are those to fix bugs found
|
|
|
|
in the RC and in the Mynewt metadata, as described in the next section.
|
2019-04-19 04:33:16 +08:00
|
|
|
|
2021-11-03 20:19:22 +08:00
|
|
|
## Imgtool release
|
2019-10-10 18:35:40 +08:00
|
|
|
|
2022-01-11 23:32:25 +08:00
|
|
|
imgtool is released through pypi.org (The Python package index).
|
|
|
|
It requires its version to be updated by editing
|
2019-10-10 18:35:40 +08:00
|
|
|
`scripts/imgtool/__init__.py` and modifying the exported version:
|
2022-01-11 23:32:25 +08:00
|
|
|
```
|
|
|
|
imgtool_version = "A.B.CrcN"
|
|
|
|
```
|
2019-10-10 18:35:40 +08:00
|
|
|
|
2022-01-11 23:32:25 +08:00
|
|
|
This version should match the current release number of MCUboot. The
|
|
|
|
suffix `rcN` (with no dash) is accepted only for the pre-release versions
|
|
|
|
under test, while numbers are accepted only for the final releases.
|
2019-10-10 18:35:40 +08:00
|
|
|
|
2022-01-11 23:32:25 +08:00
|
|
|
For more information, see [this
|
|
|
|
link](https://www.python.org/dev/peps/pep-0440/#pre-releases).
|
2019-10-10 18:35:40 +08:00
|
|
|
|
2019-04-19 04:33:16 +08:00
|
|
|
## Mynewt release information
|
|
|
|
|
2021-10-20 21:27:16 +08:00
|
|
|
On Mynewt, `newt` always fetches a versioned MCUboot release, so after
|
2022-01-11 23:32:25 +08:00
|
|
|
the RC step is finished, the release needs to be exported by modifying
|
2019-04-19 04:33:16 +08:00
|
|
|
`repository.yml` in the root directory; it must be updated with the
|
|
|
|
new release version, including updates to the pseudo keys
|
2020-01-24 20:55:27 +08:00
|
|
|
(`*-(latest|dev)`).
|
2017-09-13 00:36:19 +08:00
|
|
|
|
2021-11-03 20:19:22 +08:00
|
|
|
## Tagging and release
|
2017-09-13 00:36:19 +08:00
|
|
|
|
|
|
|
To make a release, make sure your local repo is on the tip version by
|
2022-01-11 23:32:25 +08:00
|
|
|
fetching from origin. Typically, the releaser should create a branch
|
2017-09-13 00:36:19 +08:00
|
|
|
named after the particular release.
|
|
|
|
|
|
|
|
Create a commit on top of the branch that modifies the version number
|
|
|
|
in the top-level `README.md`, and create a commit, with just this
|
2022-01-11 23:32:25 +08:00
|
|
|
change, with a commit text similar to "Bump to version a.b.c".
|
|
|
|
Having the version bump helps to make the releases
|
2017-09-13 00:36:19 +08:00
|
|
|
easier to find, as each release has a commit associated with it, and
|
|
|
|
not just a tag pointing to another commit.
|
|
|
|
|
2022-01-11 23:32:25 +08:00
|
|
|
Once this is done, the release should create a signed tag with the
|
|
|
|
appropriate tag name:
|
2017-09-13 00:36:19 +08:00
|
|
|
``` bash
|
|
|
|
git tag -s va.b.c-rcn
|
|
|
|
```
|
2022-01-11 23:32:25 +08:00
|
|
|
The releaser will need to make sure that git is configured to use the
|
|
|
|
proper signing key, and that the public key is signed by enough parties to
|
|
|
|
be trusted.
|
2017-09-13 00:36:19 +08:00
|
|
|
|
2022-01-11 23:32:25 +08:00
|
|
|
At this point, the tag can be pushed to GitHub to make the actual release
|
|
|
|
happen:
|
2017-09-13 00:36:19 +08:00
|
|
|
``` bash
|
2021-05-15 00:12:10 +08:00
|
|
|
git push origin HEAD:refs/heads/main
|
2017-09-13 00:36:19 +08:00
|
|
|
git push origin va.b.c-rcn
|
|
|
|
```
|
|
|
|
|
2021-11-03 20:19:22 +08:00
|
|
|
## Branching after a release
|
2021-01-13 22:16:40 +08:00
|
|
|
|
|
|
|
After the final (non-`rc`) a.b.0 release is made, a new branch must
|
|
|
|
be created and pushed:
|
|
|
|
|
|
|
|
``` bash
|
|
|
|
git checkout va.b.c
|
|
|
|
git checkout -b va.b-branch
|
|
|
|
git push origin va.b-branch
|
|
|
|
```
|
|
|
|
|
|
|
|
This branch will be used to generate new incremental `PATCH` releases
|
2022-01-11 23:32:25 +08:00
|
|
|
for bug fixes or required minor updates (for example, new `imgtool` features).
|
2021-01-13 22:16:40 +08:00
|
|
|
|
2020-10-30 19:17:59 +08:00
|
|
|
## Post release actions
|
|
|
|
|
2022-01-11 23:32:25 +08:00
|
|
|
Mark the MCUboot version as a development version.
|
|
|
|
|
|
|
|
The version number used should be specified for the next expected release.
|
2020-10-30 19:17:59 +08:00
|
|
|
It should be larger than the last release version by incrementing the MAJOR or
|
|
|
|
the MINOR number. It is not necessary to define the next version precisely as
|
|
|
|
the next release version might still be different as it might be needed to do:
|
|
|
|
|
|
|
|
- a patch release
|
|
|
|
- a MINOR release while a MAJOR release was expected
|
|
|
|
- a MAJOR release while a MINOR release was expected
|
|
|
|
|
2017-09-13 00:36:19 +08:00
|
|
|
[semver]: http://semver.org/
|