Skip to content

Performing a LearnLib Release

Malte Isberner edited this page Nov 7, 2013 · 8 revisions

This howto will guide you through the process of creating a release of LearnLib using Maven Release Plugin.

Prerequisites

You need:

Assumptions

For this howto, we make the following assumptions:

  • you are performing a regular (i.e., non-qualified) release. In case the release is qualified (e.g, 0.9.1-ase2013-tutorial), please do not use the master branch, but substitute master with some dedicated release branch for this qualifier
  • the current version on the develop branch is 1.2.3-SNAPSHOT, the intended release version is 1.2.3
  • all changes are commited and pushed

Process Walkthrough

Step 1: Merge develop into master branches

According to the branching model, active development is intended to be performed on the develop branch, while releases must be based on the master branch. For this purpose (after making sure all your changes are committed), perform the following:

git checkout master
git merge --no-ff develop

Note: this only holds for non-qualified releases. If the release version has a qualifier (e.g., 0.9.1-ase2013-tutorial), a dedicated release branch (e.g., named ase2013-tutorial-release) should be created and used for the release.

Step 2: Prepare the release

mvn release:clean release:prepare

You will be prompted for:

  • the release version (just hit enter)
  • the SCM tag: this has to be changed from the default learnlib-parent-1.2.3 to learnlib-1.2.3
  • the next development version: this is a SNAPSHOT version, either 1.2.4-SNAPSHOT, 1.3.0-SNAPSHOT or 2.0.0-SNAPSHOT, depending on whether this is a bugfix, minor or major development iteration
  • your GPG passphrase

Note: Version 2.2 of maven-release-plugin in allows specifying the tag format via the configuration. However, Sonatype OSS parent uses version 2.1 (and overriding it with version 2.2 does not work properly).

Step 3: Fix your local repository

There are several issues with the local repository structure at this stage:

  • the next development version is set in (and commited to) the master branch, but it should be in the development branch
  • the master branch contains three not yet pushed commits, two of them with SNAPSHOT versions

To apply the changed development version in the development branch, perform

git checkout develop
git merge --no-ff master
git checkout master

Then, the last commit in the master branch has to be dropped:

git reset --hard HEAD~1

Now, squash all not yet pushed commits on the master branch onto one commit, and retain only the last commit message:

git rebase -i

Finally, the changes to the local repository (including tagging) can be pushed to the remote repository:

git push
git push --tags

Step 4: Stage the release

Stage your release by executing the following command:

mvn release:perform

Note: It is absolutely necessary that you completely followed through the previous step and pushed your changes to the remote repository, since the release:perform will fetch the created tag from the remote repository.

Step 5: Promote the release

  1. Open the Nexus UI at https://oss.sonatype.org/ and log in
  2. Under Build Promotion, click on Staging repositories
  3. In the list, select the staging repository (delearnlib-xxxx), where xxxx is some number (usually 1001)
  4. Click "Close" (you will be prompted for a comment). Closing can take some time. You can refresh regularly, but you will also receive an e-mail notification once the repository is closed.
  5. Once the repository appears with status "closed", select it and click "Release" (you will again be prompted for a comment).

If everything went well, the artifacts should be synced to Maven Central within the next two hours.