Managing major, minor, and iteration part of a version string

In use case 3, I want to define a version schema with major release part, minor release part and iteration part. Major release part will be set manually. The "release" configuration increases minor release part of the version, while "test" configuration increases iteration part of the version. When minor release part of the version changes, iteration part should be reset to 1.

  1. Define the following variables in configuration root.live-samples.usecase3 :

    majorRelease=myproduct-1.0
    minorRelease=1
    iteration=0
  2. Define next build version of root.live-samples.usecase3.test configuration as:

    ${var["majorRelease"]}.${var["minorRelease"]} iteration ${var["iteration"].increaseAsInt()}
  3. Define next build version of root.live-samples.usecase3.release configuration as:

    ${var["majorRelease"]}.${var["iteration"].setValue(1), var["minorRelease"].(increaseAsInt(), value)}
  4. In this way, builds in root.live-samples.usecase3.release will get versions like: myproduct-1.0.1, myproduct-1.0.2, myproduct-1.0.3, ..., and builds in root.live-samples.usecase3.test will get versions like: myproduct-1.0.1 iteration 1, myproduct-1.0.1 iteration 2, myproduct-1.0.1 iteration 3, ...., myproduct-1.0.2 iteration 1, myproduct-1.0.2 iteration 2, ...