Skip to content

Git Making a Release

zepinto edited this page Sep 23, 2014 · 11 revisions

As already known, there are two main branches in Neptus. The master is the stable branch and is where the official releases are born. The other branch is the develop. This one is used to integrate changes and evolve Neptus with new features.

The version in Neptus is structured as follows: version.MAJOR, version.MINOR, version.PATCH.

Major/Minor Releases

This happens when the develop branch reaches a stable (releasable) stage. At this stage we should proceed as follows.

Edit the build.xml file and find the following properties:

<property name="version.MAJOR" value="3" />
<property name="version.MINOR" value="0" />
<property name="version.PATCH" value="0" />
<property name="version.DEVELOPER" value="" />
<property name="release.NAME" value="R14.01" />

Examples:

  • For version 3.0.0, set version.MAJOR to 3, version.MINOR to 0, and version.PATCH to 0.

  • For version 3.0.0rc1 (release candidate 1), set version.MAJOR to 3, version.MINOR to 0, and version.PATCH to 0. Additionally set the
    version.DEVELOPER to rc1.

  • Usually we name a release by the year which was made. Meaning, the release.NAME is in this case 14.01 because it is the first release of the year 2014. Every minor release increases the value, that is for version 3.1.0 the name will be 14.02. If a patch release is done we add a letter. That is for v3.0.1 will be named 14.01a, and so on.

So the steps for creating a release are:

  • Change to develop branch.

  • Commit the build.xml file with the following commit message: Preparing Neptus version A.B.C.

  • Create a branch named 'release/A.B.x' based on 'develop'.

  • If is needed same additional changes, they MUST be worked in this branch.

  • Increment by one the version_MINOR variable of branch 'develop'.

  • Before releasing you should merge the changes in the new branch into master and then into develop. Only then the final tagging is done.

  • Create an annotated tag named 'neptus-A.B.0_NAME', with commit message Releasing Neptus vA.B.0 NAME.

  • Push the new branch and tag to the remote server.

  • Checkout the created tag and create the installers.

Patch Releases

Patch releases are small fixes to an already existing release. For example, release 3.0.1 is a patch release of version 3.0.0. To perform this type of release, proceed as follows:

  • Checkout the branch from the tag created 'neptus-A.B.C_NAME' into release/neptus-A.B.x (or reuse the branch already in place for the release A.B.x).

  • Set the build.xml properties described above.

  • Make your changes.

  • Before releasing you should merge the changes in the new branch into master and then into develop. Only then the final tagging is done.

  • Create an annotated tag named 'neptus-A.B.C_NAME', with commit message Releasing Neptus vA.B.C NAME.

  • Checkout the created tag and create the installers.