Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Capra/PreparingForRelease"

Line 3: Line 3:
 
# Create a local branch for the release that contains all commits that should be part of the release.
 
# Create a local branch for the release that contains all commits that should be part of the release.
 
# Create the release using the procedure outlined below.
 
# Create the release using the procedure outlined below.
# Build the release and publish it using CI.  
+
# Build the release and publish it using CI.
 +
 
 +
This document details this process and describes some caveats.
  
 
== Create a branch for the release ==
 
== Create a branch for the release ==
Line 10: Line 12:
  
 
# Make sure that all commits that should be included in the release are present in the develop branch. If not, please cherry-pick them into <code>develop</code> or rebase develop on the relevant feature branches.
 
# Make sure that all commits that should be included in the release are present in the develop branch. If not, please cherry-pick them into <code>develop</code> or rebase develop on the relevant feature branches.
# Create a release branch from <code>develop</code> using the target release version:
+
# Create a release branch from <code>develop</code> using the target release version: <code>git checkout develop; git checkout -b release/0.7.0</code>
git checkout develop
+
git checkout -b release/0.7.0
+
 
# All fixes for the release should then go into the release branch. Once the release has been performed, this branch can be merged back into master and develop can be rebased on it.
 
# All fixes for the release should then go into the release branch. Once the release has been performed, this branch can be merged back into master and develop can be rebased on it.
  
 
== Create the release ==
 
== Create the release ==
  
Eclipse Capra is using the [https://github.com/shillner/unleash-maven-plugin/wiki/unleash:perform-tycho unleash-maven] plugin to prepare for releases. The plugin switches the version numbers to a release version for all <code>pom.xml</code> and metadata files (<code>MANIFEST.MF</code>, <code>feature.xml</code>, etc.), creates a tag for the release and then switches back to a development version. All changes are automatically committed to git.
+
Eclipse Capra is using the [https://github.com/shillner/unleash-maven-plugin/wiki/unleash:perform-tycho unleash-maven] plugin to prepare for releases. The plugin switches the version numbers to a release version for all <code>pom.xml</code> and metadata files (<code>MANIFEST.MF</code>, <code>feature.xml</code>, etc.), creates a tag for the release and then creates a commit for the switch to the next development version. The tag and this commit are automatically pushed to git.
  
 
The tool should be run locally as:
 
The tool should be run locally as:
 
  mvn unleash:perform-tycho -Dunleash.developmentVersion=0.7.0-SNAPSHOT -Dunleash.releaseVersion=0.7.0.RC_20190429
 
  mvn unleash:perform-tycho -Dunleash.developmentVersion=0.7.0-SNAPSHOT -Dunleash.releaseVersion=0.7.0.RC_20190429
  
Make sure to have <code>ssh-agent</code> running if using git with public/private key. Otherwise, please see the [https://github.com/shillner/unleash-maven-plugin/wiki/unleash:perform-tycho unleash-maven] documentation for details on how to provide credentials.  
+
Make sure to have <code>ssh-agent</code> running if using git with public/private key. Otherwise, please see the [https://github.com/shillner/unleash-maven-plugin/wiki/unleash:perform-tycho unleash-maven] documentation for details on how to provide credentials.
  
 
It is also important to note that Maven version 3.3.9 or higher. Please make sure that this version is installed.
 
It is also important to note that Maven version 3.3.9 or higher. Please make sure that this version is installed.
 +
 +
While pushing the tag works in all cases, it is possible to get a <code>[REJECTED_NONFASTFORWARD]</code> error from Maven if it is not possible to cleanly apply the commit to switch to a new development version. However, this commit remains in the local commit history and can be pushed manually after rebasing. The tag is created in any case.
 +
 +
Unfortunately, <code>unleash-maven</code> removes some linebreaks in the <code>pom.xml</code> files which means that the  copyright comments and the headers do not look pretty. It is not clear how to prevent this yet, so we have to live with that.
  
 
=== Version numbers ===
 
=== Version numbers ===

Revision as of 08:57, 30 April 2019

The general workflow for releases is as follows:

  1. Create a local branch for the release that contains all commits that should be part of the release.
  2. Create the release using the procedure outlined below.
  3. Build the release and publish it using CI.

This document details this process and describes some caveats.

Create a branch for the release

We follow the basic gitflow workflow for development, including releases.

  1. Make sure that all commits that should be included in the release are present in the develop branch. If not, please cherry-pick them into develop or rebase develop on the relevant feature branches.
  2. Create a release branch from develop using the target release version: git checkout develop; git checkout -b release/0.7.0
  3. All fixes for the release should then go into the release branch. Once the release has been performed, this branch can be merged back into master and develop can be rebased on it.

Create the release

Eclipse Capra is using the unleash-maven plugin to prepare for releases. The plugin switches the version numbers to a release version for all pom.xml and metadata files (MANIFEST.MF, feature.xml, etc.), creates a tag for the release and then creates a commit for the switch to the next development version. The tag and this commit are automatically pushed to git.

The tool should be run locally as:

mvn unleash:perform-tycho -Dunleash.developmentVersion=0.7.0-SNAPSHOT -Dunleash.releaseVersion=0.7.0.RC_20190429

Make sure to have ssh-agent running if using git with public/private key. Otherwise, please see the unleash-maven documentation for details on how to provide credentials.

It is also important to note that Maven version 3.3.9 or higher. Please make sure that this version is installed.

While pushing the tag works in all cases, it is possible to get a [REJECTED_NONFASTFORWARD] error from Maven if it is not possible to cleanly apply the commit to switch to a new development version. However, this commit remains in the local commit history and can be pushed manually after rebasing. The tag is created in any case.

Unfortunately, unleash-maven removes some linebreaks in the pom.xml files which means that the copyright comments and the headers do not look pretty. It is not clear how to prevent this yet, so we have to live with that.

Version numbers

The example above shows how to create a Release Candidate. Therefore, the development version is set to the same version as before. Usually, for a full release, we would increment the minor version like this:

mvn unleash:perform-tycho -Dunleash.developmentVersion=0.7.1-SNAPSHOT -Dunleash.releaseVersion=0.7.0

In general, we follow the Version_Numbering prescribed by Eclipse. If the version numbering does not follow the prescribed format, an org.eclipse.tycho.versions.engine.IllegalVersionChangeException will be thrown and Maven will stop processing.

Build and publish the release

Later, the tag can be used in CI to create the build and publish it to the download area.

Back to the top