View Source

h1. Situation
Include SCM revision of the source code used for checkout into version of generated build.

h1. Demonstration
Visit the [demo configuration|], and trigger a build. Version of the newly generated build will include the SCM revision corresponding to the code being checked out.

h1. Resolution
Visit [general setting of the demo configuration|]. The property _next build version_ is defined as:
{code}4.2.${vars.get("patch").increase()}-commit-${repositories.get("commons-collections").revision.value.substring(0, 6)}{code}
There are two expressions included in the version:
# The first expression increases the patch part of the version.
# The second expression retrieves current revision of repository _commons-collections_, which is used to check out source code for the build.