This document describes how to release a new version of MOCO.
Follow semantic versioning 2.0.0 to choose a new version number.
Add notable changes since the last release to CHANGELOG.md. It should look like:
(snip)
## [Unreleased]
### Added
- Implement ... (#35)
### Changed
- Fix a bug in ... (#33)
### Removed
- Deprecated `-option` is removed ... (#39)
(snip)
-
Determine a new version number. Then set
VERSION
variable.# Set VERSION and confirm it. It should not have "v" prefix. # Patch version starts with 0 $ VERSION=x.y.z $ echo $VERSION
-
Make a new branch from the latest
main
withgit neco dev bump-v$VERSION
.$ git neco dev "bump-v$VERSION"
-
Update version strings in
kustomization.yaml
andversion.go
. -
Edit
CHANGELOG.md
for the new version (example). -
Commit the change and create a pull request:
$ git commit -a -m "Bump version to v$VERSION" $ git neco review
-
Merge the new pull request.
-
Add a new tag and push it as follows:
# Set VERSION again. $ VERSION=x.y.z $ echo $VERSION $ git checkout main $ git pull $ git tag -a -m "Release v$VERSION" v$VERSION # Make sure the release tag exists. $ git tag -ln | grep $VERSION $ git push origin v$VERSION
-
(Option) Edit GitHub release page
You may edit the GitHub release page to add further details.
MOCO Helm Chart will be released independently. This will prevent the MOCO version from going up just by modifying the Helm Chart.
-
Determine a new version number:
# Set variables. They should not have "v" prefix. $ APPVERSION=x.y.z # MOCO version $ CHARTVERSION=a.b.c $ echo $APPVERSION $CHARTVERSION
-
Make a new branch from the latest
main
withgit neco dev bump-chart-v$CHARTVERSION
.$ git neco dev "bump-chart-v$CHARTVERSION"
-
Update version strings:
$ sed -r -i "s/^(appVersion: )[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+/\1${APPVERSION}/g" charts/moco/Chart.yaml $ sed -r -i "s/^(version: )[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+/\1${CHARTVERSION}/g" charts/moco/Chart.yaml $ sed -r -i "s/(tag: +# )[[:digit:]]+\.[[:digit:]]+\.[[:digit:]]+/\1${APPVERSION}/g" charts/moco/values.yaml
-
Edit
charts/moco/CHANGELOG.md
for the new version (example). -
Commit the change and create a pull request:
$ git commit -a -m "Bump chart version to v$CHARTVERSION" $ git neco review
-
Merge the new pull request.
-
Add a new tag and push it as follows:
# Set CHARTVERSION again. $ CHARTVERSION=a.b.c $ echo $CHARTVERSION $ git checkout main $ git pull $ git tag -a -m "Release chart-v$CHARTVERSION" chart-v$CHARTVERSION # Make sure the release tag exists. $ git tag -ln | grep $CHARTVERSION $ git push origin chart-v$CHARTVERSION
This repository manages the following container images that MOCO uses:
If you want to release these images, edit the TAG file.
e.g. containers/mysql/8.0.32/TAG
When a commit changing the TAG file is merged into the main branch, the release of the container image is executed. If the TAG file is not changed, the release will not be executed even if you edit the Dockerfile.
Images whose upstream version conform to Semantic Versioning 2.0.0 should be tagged like this:
Upstream version + "." + Container image version
For example, if the upstream version is X.Y.Z
, the first image for this version will
be tagged as X.Y.Z.1
. Likewise, if the upstream version has pre-release part like
X.Y.Z-beta.3
, the tag will be X.Y.Z-beta.3.1
.
The container image version will be incremented when some changes are introduced to the image.
If the upstream version has no patch version (X.Y
), fill the patch version with 0 then
add the container image version A (X.Y.0.A
).
The container image version must be reset to 1 when the upstream version is changed.
If the upstream version is "1.2.0-beta.3", the image tag must begin with "1.2.0-beta.3.1".