-
Notifications
You must be signed in to change notification settings - Fork 54
Performing a LearnLib Release
This howto will guide you through the process of creating a release of LearnLib using Maven Release Plugin.
You need:
- a Sonatype account (to create one, visit https://issues.sonatype.org/)
- developer rights for the
de.learnlib
group at Sonatype OSSRH (contact Malte Isberner for this purpose) - an installed and correctly configured GPG command line client
- GPG keys and have your public key uploaded to hkp://pool.sks-keyservers.net/ (see instructions)
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 themaster
branch, but substitutemaster
with some dedicated release branch for this qualifier - the current version on the
develop
branch is1.2.3-SNAPSHOT
, the intended release version is1.2.3
- all changes are commited and pushed
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.
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
tolearnlib-x.y.z
- the next development version: this is a SNAPSHOT version, either
1.2.4-SNAPSHOT
,1.3.0-SNAPSHOT
or2.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).
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
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.
- Open the Nexus UI at https://oss.sonatype.org/ and log in
- Under Build Promotion, click on Staging repositories
- In the list, select the staging repository (
delearnlib-xxxx
), wherexxxx
is some number (usually1001
) - 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.
- 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.