blob: 90c32b5c27b74ad21e9264693f8dd0462fb88d64 [file] [log] [blame] [view]
David Brownc3370252017-09-12 10:36:19 -06001# Release Process
2
3The following documents the release process used with mcuboot.
4
5## Version numbering
6
7MCUboot uses [semantic versioning][semver], where version numbers
8follow a MAJOR.MINOR.PATCH format with the following guidelines on
9incremeting the numbers:
10
111. MAJOR version when you make incompatible API changes,
122. MINOR version when you add functionality in a backwards-compatible
13 manner, and
143. PATCH version when you make backwards-compatible bug fixes.
15
16We add pre-release tags of the format MAJOR.MINOR.PATCH-rc1.
17
Andrzej Puzdrowskidfc7c5f2020-10-30 12:17:59 +010018We mark in documentation an MCUBoot development version using
19the format MAJOR.MINOR.PATCH-dev.
20
David Browna3032912017-09-12 12:07:45 -060021## Release Notes
22
23Before making a release, be sure to update the `docs/release-notes.md`
24to describe the release. This should be a high-level description of
25the changes, not a list of the git commits.
26
David Brownc3370252017-09-12 10:36:19 -060027## Release Candidates
28
29Prior to each release, tags are made (see below) for at least one
30release candidate (a.b.c-rc1, followed by a.b.c-rc2, etc, followed by
31the official a.b.c release). The intent is to freeze the code for a
32time, and allow testing to happen.
33
34During the time between rc1 and the final release, the only changes
David Brownfe0bfcf2021-05-14 10:12:10 -060035that should be merged into main are those to fix bugs found in the
Fabio Utzige1727d92019-04-18 17:33:16 -030036rc and Mynewt metadata as described in the next section.
37
Fabio Utzigc7fe3b02019-10-10 07:35:40 -030038## imgtool release
39
40imgtool is released through pypi.org (The Python package index) and
41requires that its version to be updated by editing
42`scripts/imgtool/__init__.py` and modifying the exported version:
43
Fabio Utzig5b0f2202021-01-13 11:16:40 -030044`imgtool_version = "A.B.CrcN"`
Fabio Utzigc7fe3b02019-10-10 07:35:40 -030045
Fabio Utzig5b0f2202021-01-13 11:16:40 -030046This version should match the current release number of MCUboot; `rcN`
47(with no dash!) is accepted for pre-release version under test, and
48numbers only for final releases. For more info see:
Fabio Utzigc7fe3b02019-10-10 07:35:40 -030049
50https://www.python.org/dev/peps/pep-0440/#pre-releases
51
Fabio Utzige1727d92019-04-18 17:33:16 -030052## Mynewt release information
53
54On Mynewt, `newt` always fetches a versioned MCUBoot release, so after
55the rc step is finished, the release needs to be exported by modifying
56`repository.yml` in the root directory; it must be updated with the
57new release version, including updates to the pseudo keys
Fabio Utzig20e747c2020-01-24 09:55:27 -030058(`*-(latest|dev)`).
David Brownc3370252017-09-12 10:36:19 -060059
60## Tagging and Release
61
62To make a release, make sure your local repo is on the tip version by
63fetching from origin. Typically, the releaser should create a branch
64named after the particular release.
65
66Create a commit on top of the branch that modifies the version number
67in the top-level `README.md`, and create a commit, with just this
68change, with a commit text similar to “Bump to version
69a.b.c”. Having the version bump helps to make the releases
70easier to find, as each release has a commit associated with it, and
71not just a tag pointing to another commit.
72
73Once this is done, the release should create a signed tag:
74``` bash
75git tag -s va.b.c-rcn
76```
77with the appropriate tag name. The releaser will need to make sure
78that git is configured to use the proper signing key, and that the
79public key is signed by enough parties to be trusted.
80
81At this point, the tag can be pushed to github to make the actual
82release happen:
83``` bash
David Brownfe0bfcf2021-05-14 10:12:10 -060084git push origin HEAD:refs/heads/main
David Brownc3370252017-09-12 10:36:19 -060085git push origin va.b.c-rcn
86```
87
Fabio Utzig5b0f2202021-01-13 11:16:40 -030088## Branching after a Release
89
90After the final (non-`rc`) a.b.0 release is made, a new branch must
91be created and pushed:
92
93``` bash
94git checkout va.b.c
95git checkout -b va.b-branch
96git push origin va.b-branch
97```
98
99This branch will be used to generate new incremental `PATCH` releases
100for bug fixes or required minor updates (eg, new `imgtool` features).
101
Andrzej Puzdrowskidfc7c5f2020-10-30 12:17:59 +0100102## Post release actions
103
104Mark the MCUBoot version as a development version. The version number used
105should be specified for the next expected release.
106It should be larger than the last release version by incrementing the MAJOR or
107the MINOR number. It is not necessary to define the next version precisely as
108the next release version might still be different as it might be needed to do:
109
110- a patch release
111- a MINOR release while a MAJOR release was expected
112- a MAJOR release while a MINOR release was expected
113
114
David Brownc3370252017-09-12 10:36:19 -0600115[semver]: http://semver.org/