David Brown | c337025 | 2017-09-12 10:36:19 -0600 | [diff] [blame] | 1 | # Release Process |
| 2 | |
| 3 | The following documents the release process used with mcuboot. |
| 4 | |
| 5 | ## Version numbering |
| 6 | |
| 7 | MCUboot uses [semantic versioning][semver], where version numbers |
| 8 | follow a MAJOR.MINOR.PATCH format with the following guidelines on |
| 9 | incremeting the numbers: |
| 10 | |
| 11 | 1. MAJOR version when you make incompatible API changes, |
| 12 | 2. MINOR version when you add functionality in a backwards-compatible |
| 13 | manner, and |
| 14 | 3. PATCH version when you make backwards-compatible bug fixes. |
| 15 | |
| 16 | We add pre-release tags of the format MAJOR.MINOR.PATCH-rc1. |
| 17 | |
David Brown | a303291 | 2017-09-12 12:07:45 -0600 | [diff] [blame] | 18 | ## Release Notes |
| 19 | |
| 20 | Before making a release, be sure to update the `docs/release-notes.md` |
| 21 | to describe the release. This should be a high-level description of |
| 22 | the changes, not a list of the git commits. |
| 23 | |
David Brown | c337025 | 2017-09-12 10:36:19 -0600 | [diff] [blame] | 24 | ## Release Candidates |
| 25 | |
| 26 | Prior to each release, tags are made (see below) for at least one |
| 27 | release candidate (a.b.c-rc1, followed by a.b.c-rc2, etc, followed by |
| 28 | the official a.b.c release). The intent is to freeze the code for a |
| 29 | time, and allow testing to happen. |
| 30 | |
| 31 | During the time between rc1 and the final release, the only changes |
| 32 | that should be merged into master are those to fix bugs found in the |
Fabio Utzig | e1727d9 | 2019-04-18 17:33:16 -0300 | [diff] [blame] | 33 | rc and Mynewt metadata as described in the next section. |
| 34 | |
Fabio Utzig | c7fe3b0 | 2019-10-10 07:35:40 -0300 | [diff] [blame^] | 35 | ## imgtool release |
| 36 | |
| 37 | imgtool is released through pypi.org (The Python package index) and |
| 38 | requires that its version to be updated by editing |
| 39 | `scripts/imgtool/__init__.py` and modifying the exported version: |
| 40 | |
| 41 | `imgtool_version = "X.Y.ZrcN"` |
| 42 | |
| 43 | where `rcX`, `aX` and `bX` are accepted pre-release versions (just |
| 44 | numbers for final releases). For more info see: |
| 45 | |
| 46 | https://www.python.org/dev/peps/pep-0440/#pre-releases |
| 47 | |
Fabio Utzig | e1727d9 | 2019-04-18 17:33:16 -0300 | [diff] [blame] | 48 | ## Mynewt release information |
| 49 | |
| 50 | On Mynewt, `newt` always fetches a versioned MCUBoot release, so after |
| 51 | the rc step is finished, the release needs to be exported by modifying |
| 52 | `repository.yml` in the root directory; it must be updated with the |
| 53 | new release version, including updates to the pseudo keys |
| 54 | (`*-(latest|dev)`). Similarly `version.yml` must have its `repo.version` |
| 55 | key updated with the version number being released. |
David Brown | c337025 | 2017-09-12 10:36:19 -0600 | [diff] [blame] | 56 | |
| 57 | ## Tagging and Release |
| 58 | |
| 59 | To make a release, make sure your local repo is on the tip version by |
| 60 | fetching from origin. Typically, the releaser should create a branch |
| 61 | named after the particular release. |
| 62 | |
| 63 | Create a commit on top of the branch that modifies the version number |
| 64 | in the top-level `README.md`, and create a commit, with just this |
| 65 | change, with a commit text similar to “Bump to version |
| 66 | a.b.c”. Having the version bump helps to make the releases |
| 67 | easier to find, as each release has a commit associated with it, and |
| 68 | not just a tag pointing to another commit. |
| 69 | |
| 70 | Once this is done, the release should create a signed tag: |
| 71 | ``` bash |
| 72 | git tag -s va.b.c-rcn |
| 73 | ``` |
| 74 | with the appropriate tag name. The releaser will need to make sure |
| 75 | that git is configured to use the proper signing key, and that the |
| 76 | public key is signed by enough parties to be trusted. |
| 77 | |
| 78 | At this point, the tag can be pushed to github to make the actual |
| 79 | release happen: |
| 80 | ``` bash |
David Brown | a303291 | 2017-09-12 12:07:45 -0600 | [diff] [blame] | 81 | git push origin HEAD:refs/heads/master |
David Brown | c337025 | 2017-09-12 10:36:19 -0600 | [diff] [blame] | 82 | git push origin va.b.c-rcn |
| 83 | ``` |
| 84 | |
Fabio Utzig | e1727d9 | 2019-04-18 17:33:16 -0300 | [diff] [blame] | 85 | ## Update Mynewt version.yml |
| 86 | |
| 87 | On master `version.yml` must always have its `repo.version` |
| 88 | key set to "0.0.0" to this must be done now that the release |
| 89 | is finished. |
| 90 | |
David Brown | c337025 | 2017-09-12 10:36:19 -0600 | [diff] [blame] | 91 | [semver]: http://semver.org/ |