jgitver-maven-plugin
jgitver-maven-plugin copied to clipboard
add support for parallel support/release branches
Feature Request
version: 1.4.3
Use case: Using long-term support branches to maintain and release parallel versions of the code.
Problem description: There is currently no way to extract version from branch names, more specifically when using release or support branches as described in git flow. This topic has been partly covered in previous issues (e.g. #85 , #95 ), and there was mention of ongoing work, but I thought a dedicated issue would help in clarifying and tracking the requirement.
The solution proposed in #95 helps dealing with the support branch name by ignoring it, but it still requires a first commit and tag on the support branch to produce the right version. It should be possible to merely branch at a given commit, and right away use the proper version depending on whether you're on the support branch or the master.
Example:
master
|
A * tag 1.3.0, 2.0.0
|
B * --branch-> support/1.x
| |
| C * tag 1.4.0
| |
In this case, building commit B should produce a version based on 2.0.0 if on branch master or in detached state, while it should be using version 1.3.0 if attached to branch support/1.x
.
Furthermore, commit C should be using version 1.4.0 .