Releases
Feature releases
To release a new feature (i.e., minor) version of Hexatomic, run the following commands in the repository root directory.
git checkout develop
- Checks out the develop branch (feature releases are always based ondevelop
).git pull origin develop
- Updates the local develop branch.mvn clean install
- Builds the project, runs tests, and may update the file headers in Java files.git add .
- Adds the updated files - if any - to the Git index. Make sure you only add intended changes.git commit -m "Update file headers"
- Commits the updates to version control.git push
- Updates the remote develop branch.mvn gitflow:release-start
- Starts the release process.- The Maven GitFlow plugin will then prompt you to enter a version number for the release. Make sure you enter a version identifier according to semantic versioning, in the format
MAJOR.MINOR.PATCH
. Do not use a-SNAPSHOT
suffix! - Check if the
[Unreleased]
changelog section inCHANGELOG.md
is complete and up-to-date. Make changes, commit and push if necessary. mvn keepachangelog:release -N
- Updates the changelog in the release branch.git add CHANGELOG.md
- Adds the updated changelog to the Git index.git commit -m "Update changelog"
- Commits the updated changelog to version control.git push
- Updates the remote release branch.mvn gitflow:release-finish
- Finalizes the release process.
Hotfix releases
Hotfixes come into the project via pull requests of a hotfix branch against master
.
Important: Do not merge pull requests from hotfix branches into master!
Instead, checkout the hotfix branch locally, and start the merge and release process with the Maven GitFlow plugin:
git checkout hotfix/{hotfix version}
- Checks out the respective hotfix branch.git pull origin hotfix/{hotfix version}
- Checks for any remote changes to the branch.mvn clean install
- Builds the project, runs tests, and may update the file headers in Java files.git add .
- Adds the updated files - if any - to the Git index. Make sure you only add intended changes.git commit -m "Update file headers"
- Commits the updates to version control.git push
- Updates the remote hotfix branch.- Check if the
[Unreleased]
changelog section inCHANGELOG.md
is complete and up-to-date. Make changes, commit and push if necessary. mvn keepachangelog:release -N
- Updates the changelog in the release branch.git add CHANGELOG.md
- Adds the updated changelog to the Git index.git commit -m "Update changelog"
- Commits the updated changelog to version control.git push
- Updates the remote release branch.mvn gitflow:hotfix-finish
- Finalizes the hotfix and finishes the merge and release procedure.
What to do when releases go wrong?
When a feature release doesn't work as expected, simply
- Checkout the
develop
branch (git checkout develop
). - Delete the release branch for the version you wanted to release (
git branch -d release/{version}
). - Delete the same branch on GitHub (via the web interface).
- Restart the release process from the top.
When a hotfix release doesn't work as expected, simply
- Make the necessary changes in the hotfix branch, then continue with the merge and release process.