|
| 1 | +# Releases |
| 2 | + |
| 3 | +This page describes the release process and the currently planned schedule for upcoming releases as well as the respective release shepherd. |
| 4 | + |
| 5 | +## Release schedule |
| 6 | + |
| 7 | +| release series | date (year-month-day) | release shepherd | |
| 8 | +|----------------|--------------------------------------------|---------------------------------------------| |
| 9 | +| v0.5.0 | 2021-12-21 | Laminar (GitHub: @tpiperatgod) | |
| 10 | + |
| 11 | +# How to cut a new release |
| 12 | + |
| 13 | +> This guide is strongly based on the [Prometheus release instructions](https://github.com/prometheus/prometheus/blob/master/RELEASE.md). |
| 14 | +
|
| 15 | +## Branch management and versioning strategy |
| 16 | + |
| 17 | +We use [Semantic Versioning](http://semver.org/). |
| 18 | + |
| 19 | +We maintain a separate branch for each minor release, named `release-<major>.<minor>`, e.g. `release-1.1`, `release-2.0`. |
| 20 | + |
| 21 | +The usual flow is to merge new features and changes into the main branch and to merge bug fixes into the latest release branch. Bug fixes are then merged into main from the latest release branch. The main branch should always contain all commits from the latest release branch. |
| 22 | + |
| 23 | +If a bug fix got accidentally merged into main, cherry-pick commits have to be created in the latest release branch, which then have to be merged back into main. Try to avoid that situation. |
| 24 | + |
| 25 | +Maintaining the release branches for older minor releases happens on a best effort basis. |
| 26 | + |
| 27 | +## Prepare your release |
| 28 | + |
| 29 | +For a new major or minor release, work from the `main` branch. For a patch release, work in the branch of the minor release you want to patch (e.g. `release-0.1` if you're releasing `v0.1.1`). |
| 30 | + |
| 31 | +Change the `Install the latest stable version` section in README.md to the new stable version: |
| 32 | +```bash |
| 33 | +kubectl apply -f https://github.com/OpenFunction/cli/releases/download/v<major>.<minor>.<patch>/bundle.yaml |
| 34 | +``` |
| 35 | + |
| 36 | +Add an entry for the new version to the `CHANGELOG.md` file. Entries in the `CHANGELOG.md` are meant to be in this order: |
| 37 | + |
| 38 | +* `[CHANGE]` |
| 39 | +* `[FEATURE]` |
| 40 | +* `[ENHANCEMENT]` |
| 41 | +* `[BUGFIX]` |
| 42 | + |
| 43 | +Create a PR for the changes to be reviewed. |
| 44 | + |
| 45 | +## Publish the new release |
| 46 | + |
| 47 | +For new minor and major releases, create the `release-<major>.<minor>` branch starting at the PR merge commit. |
| 48 | +From now on, all work happens on the `release-<major>.<minor>` branch. |
| 49 | + |
| 50 | +Build the `ofn` cli: |
| 51 | + |
| 52 | +```bash |
| 53 | +make build |
| 54 | +``` |
| 55 | +Tag the new release with a tag named `v<major>.<minor>.<patch>`, e.g. `v2.1.3`. Note the `v` prefix. You can do the tagging on the commandline: |
| 56 | + |
| 57 | +```bash |
| 58 | +tag="$(< VERSION)" |
| 59 | +git tag -a "${tag}" -m "${tag}" |
| 60 | +git push origin "${tag}" |
| 61 | +``` |
| 62 | +Commit all the changes. |
| 63 | + |
| 64 | +Go to https://github.com/OpenFunction/cli/releases/new, associate the new release with the before pushed tag, paste in changes made to `CHANGELOG.md`, add cli file `ofn` and then click "Publish release". |
| 65 | + |
| 66 | +For patch releases, submit a pull request to merge back the release branch into the `main` branch. |
| 67 | + |
0 commit comments