blob: 48b555ce32abdef8c924e20fa18572c3ee80e0cb [file] [log] [blame] [view]
Francesco Servidio5bc98322021-11-03 13:19:22 +01001# Release process
David Brownc3370252017-09-12 10:36:19 -06002
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +01003This page describes the release process used with MCUboot.
David Brownc3370252017-09-12 10:36:19 -06004
5## Version numbering
6
7MCUboot uses [semantic versioning][semver], where version numbers
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +01008follow a `MAJOR.MINOR.PATCH` format with the following guidelines on
9incrementing the numbers:
David Brownc3370252017-09-12 10:36:19 -060010
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +0100111. MAJOR version when there are incompatible API changes.
122. MINOR version when new functionalities were added in a
13 backward-compatible manner.
143. PATCH version when there are backward-compatible bug fixes.
David Brownc3370252017-09-12 10:36:19 -060015
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010016We add pre-release tags using the format `MAJOR.MINOR.PATCH-rc1`.
David Brownc3370252017-09-12 10:36:19 -060017
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010018In the documentation, we mark an MCUBoot development version using the
19format `MAJOR.MINOR.PATCH-dev`.
Andrzej Puzdrowskidfc7c5f2020-10-30 12:17:59 +010020
Francesco Servidio5bc98322021-11-03 13:19:22 +010021## Release notes
David Browna3032912017-09-12 12:07:45 -060022
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010023Before making a release, update the `docs/release-notes.md` file
24to describe the release. This should be a high-level description of
David Browna3032912017-09-12 12:07:45 -060025the changes, not a list of the git commits.
26
David Brownd4184eb2023-02-14 16:52:24 -070027Provided that changes going into the release have followed the
28contribution guidelines, this should mostly consist of collecting the
29various snippets in the `docs/release-notes.d` directory. After
30incorporating these snippets into the release notes, the snippet files
31should be removed to ready the directory for the next release cycle.
32
Francesco Servidio5bc98322021-11-03 13:19:22 +010033## Release candidates
David Brownc3370252017-09-12 10:36:19 -060034
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010035Before each release, tags are made (see below) for at least one
36release candidate (a.b.c-rc1, followed by a.b.c-rc2 and the subsequent
37release candidates, followed by the official a.b.c release). The intent
38is to freeze the code and allow testing.
David Brownc3370252017-09-12 10:36:19 -060039
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010040During the time between the rc1 and the final release, the only changes
41that should be merged into the main branch are those to fix bugs found
42in the RC and in the Mynewt metadata, as described in the next section.
Fabio Utzige1727d92019-04-18 17:33:16 -030043
Francesco Servidio5bc98322021-11-03 13:19:22 +010044## Imgtool release
Fabio Utzigc7fe3b02019-10-10 07:35:40 -030045
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010046imgtool is released through pypi.org (The Python package index).
47It requires its version to be updated by editing
Fabio Utzigc7fe3b02019-10-10 07:35:40 -030048`scripts/imgtool/__init__.py` and modifying the exported version:
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010049```
50imgtool_version = "A.B.CrcN"
51```
Fabio Utzigc7fe3b02019-10-10 07:35:40 -030052
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010053This version should match the current release number of MCUboot. The
54suffix `rcN` (with no dash) is accepted only for the pre-release versions
55under test, while numbers are accepted only for the final releases.
Fabio Utzigc7fe3b02019-10-10 07:35:40 -030056
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010057For more information, see [this
58link](https://www.python.org/dev/peps/pep-0440/#pre-releases).
Fabio Utzigc7fe3b02019-10-10 07:35:40 -030059
Fabio Utzige1727d92019-04-18 17:33:16 -030060## Mynewt release information
61
Francesco Servidio4ff0c182021-10-20 15:27:16 +020062On Mynewt, `newt` always fetches a versioned MCUboot release, so after
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010063the RC step is finished, the release needs to be exported by modifying
Fabio Utzige1727d92019-04-18 17:33:16 -030064`repository.yml` in the root directory; it must be updated with the
65new release version, including updates to the pseudo keys
Fabio Utzig20e747c2020-01-24 09:55:27 -030066(`*-(latest|dev)`).
David Brownc3370252017-09-12 10:36:19 -060067
Francesco Servidio5bc98322021-11-03 13:19:22 +010068## Tagging and release
David Brownc3370252017-09-12 10:36:19 -060069
70To make a release, make sure your local repo is on the tip version by
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010071fetching from origin. Typically, the releaser should create a branch
David Brownc3370252017-09-12 10:36:19 -060072named after the particular release.
73
74Create a commit on top of the branch that modifies the version number
75in the top-level `README.md`, and create a commit, with just this
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010076change, with a commit text similar to "Bump to version a.b.c".
77Having the version bump helps to make the releases
David Brownc3370252017-09-12 10:36:19 -060078easier to find, as each release has a commit associated with it, and
79not just a tag pointing to another commit.
80
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010081Once this is done, the release should create a signed tag with the
82appropriate tag name:
David Brownc3370252017-09-12 10:36:19 -060083``` bash
84git tag -s va.b.c-rcn
85```
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010086The releaser will need to make sure that git is configured to use the
87proper signing key, and that the public key is signed by enough parties to
88be trusted.
David Brownc3370252017-09-12 10:36:19 -060089
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010090At this point, the tag can be pushed to GitHub to make the actual release
91happen:
David Brownc3370252017-09-12 10:36:19 -060092``` bash
David Brownfe0bfcf2021-05-14 10:12:10 -060093git push origin HEAD:refs/heads/main
David Brownc3370252017-09-12 10:36:19 -060094git push origin va.b.c-rcn
95```
96
Francesco Servidio5bc98322021-11-03 13:19:22 +010097## Branching after a release
Fabio Utzig5b0f2202021-01-13 11:16:40 -030098
99After the final (non-`rc`) a.b.0 release is made, a new branch must
100be created and pushed:
101
102``` bash
103git checkout va.b.c
104git checkout -b va.b-branch
105git push origin va.b-branch
106```
107
108This branch will be used to generate new incremental `PATCH` releases
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +0100109for bug fixes or required minor updates (for example, new `imgtool` features).
Fabio Utzig5b0f2202021-01-13 11:16:40 -0300110
Andrzej Puzdrowskidfc7c5f2020-10-30 12:17:59 +0100111## Post release actions
112
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +0100113Mark the MCUboot version as a development version.
114
115The version number used should be specified for the next expected release.
Andrzej Puzdrowskidfc7c5f2020-10-30 12:17:59 +0100116It should be larger than the last release version by incrementing the MAJOR or
117the MINOR number. It is not necessary to define the next version precisely as
118the next release version might still be different as it might be needed to do:
119
120- a patch release
121- a MINOR release while a MAJOR release was expected
122- a MAJOR release while a MINOR release was expected
123
David Brownc3370252017-09-12 10:36:19 -0600124[semver]: http://semver.org/