blob: c6e88b8cb8b718993ecb8005714f3c968e495fcf [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
Jamie McCraea6aef322023-05-25 08:19:26 +010068## Zephyr release information
69
70There is a version file used by Zephyr builds to indicate the version
71of MCUboot being used which needs to be updated at
72`boot/zephyr/VERSION`. For alignment with Zephyr versions, development
73versions should set `PATCHLEVEL` to `99` and `EXTRAVERSION` to `dev`,
74whilst production versions should correctly set `PATCHLEVEL` and clear
75`EXTRAVERSION`.
76
Francesco Servidio5bc98322021-11-03 13:19:22 +010077## Tagging and release
David Brownc3370252017-09-12 10:36:19 -060078
79To make a release, make sure your local repo is on the tip version by
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010080fetching from origin. Typically, the releaser should create a branch
David Brownc3370252017-09-12 10:36:19 -060081named after the particular release.
82
83Create a commit on top of the branch that modifies the version number
84in the top-level `README.md`, and create a commit, with just this
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010085change, with a commit text similar to "Bump to version a.b.c".
86Having the version bump helps to make the releases
David Brownc3370252017-09-12 10:36:19 -060087easier to find, as each release has a commit associated with it, and
88not just a tag pointing to another commit.
89
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010090Once this is done, the release should create a signed tag with the
91appropriate tag name:
David Brownc3370252017-09-12 10:36:19 -060092``` bash
93git tag -s va.b.c-rcn
94```
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010095The releaser will need to make sure that git is configured to use the
96proper signing key, and that the public key is signed by enough parties to
97be trusted.
David Brownc3370252017-09-12 10:36:19 -060098
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +010099At this point, the tag can be pushed to GitHub to make the actual release
100happen:
David Brownc3370252017-09-12 10:36:19 -0600101``` bash
David Brownfe0bfcf2021-05-14 10:12:10 -0600102git push origin HEAD:refs/heads/main
David Brownc3370252017-09-12 10:36:19 -0600103git push origin va.b.c-rcn
104```
105
Francesco Servidio5bc98322021-11-03 13:19:22 +0100106## Branching after a release
Fabio Utzig5b0f2202021-01-13 11:16:40 -0300107
108After the final (non-`rc`) a.b.0 release is made, a new branch must
109be created and pushed:
110
111``` bash
112git checkout va.b.c
113git checkout -b va.b-branch
114git push origin va.b-branch
115```
116
117This branch will be used to generate new incremental `PATCH` releases
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +0100118for bug fixes or required minor updates (for example, new `imgtool` features).
Fabio Utzig5b0f2202021-01-13 11:16:40 -0300119
Andrzej Puzdrowskidfc7c5f2020-10-30 12:17:59 +0100120## Post release actions
121
Francesco Domenico Servidio4fb288a2022-01-11 16:32:25 +0100122Mark the MCUboot version as a development version.
123
124The version number used should be specified for the next expected release.
Andrzej Puzdrowskidfc7c5f2020-10-30 12:17:59 +0100125It should be larger than the last release version by incrementing the MAJOR or
126the MINOR number. It is not necessary to define the next version precisely as
127the next release version might still be different as it might be needed to do:
128
129- a patch release
130- a MINOR release while a MAJOR release was expected
131- a MAJOR release while a MINOR release was expected
132
David Brownc3370252017-09-12 10:36:19 -0600133[semver]: http://semver.org/