blob: 170c9b8ea15aa43d362e6e289ec382f8a84b3432 [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
Francesco Servidio5bc98322021-11-03 13:19:22 +010027## Release candidates
David Brownc3370252017-09-12 10:36:19 -060028
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010029Before each release, tags are made (see below) for at least one
30release candidate (a.b.c-rc1, followed by a.b.c-rc2 and the subsequent
31release candidates, followed by the official a.b.c release). The intent
32is to freeze the code and allow testing.
David Brownc3370252017-09-12 10:36:19 -060033
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010034During the time between the rc1 and the final release, the only changes
35that should be merged into the main branch are those to fix bugs found
36in the RC and in the Mynewt metadata, as described in the next section.
Fabio Utzige1727d92019-04-18 17:33:16 -030037
Francesco Servidio5bc98322021-11-03 13:19:22 +010038## Imgtool release
Fabio Utzigc7fe3b02019-10-10 07:35:40 -030039
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010040imgtool is released through pypi.org (The Python package index).
41It requires its version to be updated by editing
Fabio Utzigc7fe3b02019-10-10 07:35:40 -030042`scripts/imgtool/__init__.py` and modifying the exported version:
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010043```
44imgtool_version = "A.B.CrcN"
45```
Fabio Utzigc7fe3b02019-10-10 07:35:40 -030046
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010047This version should match the current release number of MCUboot. The
48suffix `rcN` (with no dash) is accepted only for the pre-release versions
49under test, while numbers are accepted only for the final releases.
Fabio Utzigc7fe3b02019-10-10 07:35:40 -030050
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010051For more information, see [this
52link](https://www.python.org/dev/peps/pep-0440/#pre-releases).
Fabio Utzigc7fe3b02019-10-10 07:35:40 -030053
Fabio Utzige1727d92019-04-18 17:33:16 -030054## Mynewt release information
55
Francesco Servidio4ff0c182021-10-20 15:27:16 +020056On Mynewt, `newt` always fetches a versioned MCUboot release, so after
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010057the RC step is finished, the release needs to be exported by modifying
Fabio Utzige1727d92019-04-18 17:33:16 -030058`repository.yml` in the root directory; it must be updated with the
59new release version, including updates to the pseudo keys
Fabio Utzig20e747c2020-01-24 09:55:27 -030060(`*-(latest|dev)`).
David Brownc3370252017-09-12 10:36:19 -060061
Francesco Servidio5bc98322021-11-03 13:19:22 +010062## Tagging and release
David Brownc3370252017-09-12 10:36:19 -060063
64To make a release, make sure your local repo is on the tip version by
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010065fetching from origin. Typically, the releaser should create a branch
David Brownc3370252017-09-12 10:36:19 -060066named after the particular release.
67
68Create a commit on top of the branch that modifies the version number
69in the top-level `README.md`, and create a commit, with just this
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010070change, with a commit text similar to "Bump to version a.b.c".
71Having the version bump helps to make the releases
David Brownc3370252017-09-12 10:36:19 -060072easier to find, as each release has a commit associated with it, and
73not just a tag pointing to another commit.
74
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010075Once this is done, the release should create a signed tag with the
76appropriate tag name:
David Brownc3370252017-09-12 10:36:19 -060077``` bash
78git tag -s va.b.c-rcn
79```
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010080The releaser will need to make sure that git is configured to use the
81proper signing key, and that the public key is signed by enough parties to
82be trusted.
David Brownc3370252017-09-12 10:36:19 -060083
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010084At this point, the tag can be pushed to GitHub to make the actual release
85happen:
David Brownc3370252017-09-12 10:36:19 -060086``` bash
David Brownfe0bfcf2021-05-14 10:12:10 -060087git push origin HEAD:refs/heads/main
David Brownc3370252017-09-12 10:36:19 -060088git push origin va.b.c-rcn
89```
90
Francesco Servidio5bc98322021-11-03 13:19:22 +010091## Branching after a release
Fabio Utzig5b0f2202021-01-13 11:16:40 -030092
93After the final (non-`rc`) a.b.0 release is made, a new branch must
94be created and pushed:
95
96``` bash
97git checkout va.b.c
98git checkout -b va.b-branch
99git push origin va.b-branch
100```
101
102This branch will be used to generate new incremental `PATCH` releases
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +0100103for bug fixes or required minor updates (for example, new `imgtool` features).
Fabio Utzig5b0f2202021-01-13 11:16:40 -0300104
Andrzej Puzdrowskidfc7c5f2020-10-30 12:17:59 +0100105## Post release actions
106
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +0100107Mark the MCUboot version as a development version.
108
109The version number used should be specified for the next expected release.
Andrzej Puzdrowskidfc7c5f2020-10-30 12:17:59 +0100110It should be larger than the last release version by incrementing the MAJOR or
111the MINOR number. It is not necessary to define the next version precisely as
112the next release version might still be different as it might be needed to do:
113
114- a patch release
115- a MINOR release while a MAJOR release was expected
116- a MAJOR release while a MINOR release was expected
117
David Brownc3370252017-09-12 10:36:19 -0600118[semver]: http://semver.org/