Skip to content

Release guide

Herman De Beukelaer edited this page Sep 6, 2017 · 10 revisions

This page describes how to release version x.y.z of Core Hunter. In all commands, x.y.z needs to be replaced with the actual version of the release, e.g. 3.2.0. Note that the commands used require the git-flow extension for git. To install git-flow, follow the instructions provided here.

Initialize git-flow

After installing git-flow, when using it for the first time within the Core Hunter repository, you need to initialize it using the command

git flow init

Use the defaults for all prompted settings.

Create release branch

Create a release branch from develop with

git flow release start x.y.z

The newly created release branch release/x.y.z is automatically checked out. Now publish it to GitHub with

git flow release publish x.y.z

Prepare release

On the release branch release/x.y.z., remove the -SNAPSHOT suffix from the version in all (sub)modules. You can either do this manually, or using the maven versions plugin, with the command

mvn versions:set -DremoveSnapshot

Check whether all versions have been correctly updated. If you made a mistake, you can revert the changes with

mvn versions:revert

To accept the changes, and remove backups of the original POM files, run

mvn versions:commit

Now commit and push the changes to GitHub with

git add pom.xml '**/pom.xml'
git commit -m "set versions to x.y.z"
git push

Create pull request

On GitHub, create a pull request to merge release/x.y.z into master. Wait until all checks have passed. If there are any issues, fix them in the release branch.

Deploy to Maven Central

After any issues reported in the pull request have been fixed, deploy the release to Maven Central with

mvn -P release clean deploy

Maven will sign all produced artifacts, and may therefore ask for your passphrase (multiple times). Instructions for setting up a PGP signature are provided here.

Finish release

After a successful deploy, finish the release with

git flow release finish x.y.z

Executing this command will

  1. Merge the release branch release/x.y.z into master.
  2. Tag the release with its name x.y.z.
  3. Back-merge the release into develop.
  4. Remove the release branch release/x.y.z.

You should now be back on the develop branch. Switch to master and push the merge and new release tag with

git checkout master
git push
git push --tags

The pull request on GitHub should now automatically be closed.

Publish release on GitHub

Go to https://github.com/corehunter/corehunter3/releases and publish a release for the newly added tag x.y.z.

Start new development version

Switch back to the develop branch, and update the version of all (sub)modules to start the new development version. Again, this can easily be done with the maven versions plugin:

git checkout develop
mvn versions:set -DnewVersion=...-SNAPSHOT

Verify the changes and accept them with

mvn versions:commit

Finally, push the changes with

git add pom.xml '**/pom.xml'
git commit -m "start next snapshot ...-SNAPSHOT"
git push