Skip to content

Automating Bumping of Version Numbers and Tagging Releases

Jurgen J. Vinju edited this page Aug 16, 2017 · 5 revisions

For deploying releases, please use the mvn release:prepare command of the maven release plugin. The plugin takes care of bumping the version numbers and tagging the release in the version control system. Using the release plugin facilitates the goal of usethesource.io to use semantic versioning.

Example Releasing Version 0.5.2

During development of version 0.5.2 of the rascal-value library, its version number reads 0.5.2-SNAPSHOT. In the version control system there might be several commits that all relate to the running version 0.5.2-SNAPSHOT. Upon releasing a version, the maven release plugin takes that there is exactly one commit with the version string 0.5.2 (without the SNAPSHOT postfix).

First execute this:

  • mvn release:prepare

When executing mvn release:prepare you get three questions answered:

What is the release version for "value"? (org.rascalmpl:value) 0.5.2: :

What is SCM release tag or label for "value"? (org.rascalmpl:value) value-0.5.2: : v0.5.2

What is the new development version for "value"? (org.rascalmpl:value) 0.5.3-SNAPSHOT: :

Due to our naming schema, we only change the proposed SCM release tag (i.e., from value-0.5.2 to v0.5.2). The executed maven command takes care pushing the version tags and commits concerned (due to the version bumping) to the repository on github.

After the prepare has succeeded and you have git push the new tags, we can do the actual release:

  • mvn release:perform
  • git push
Clone this wiki locally