jgitver / jgitver/jgitver-maven-plugin

add support for parallel support/release branches

Open
#104 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Groovy
Stars
166
Forks
42
PR merge metrics
No merged PRs in 30d

Description

## 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](https://gitversion.readthedocs.io/en/latest/git-branching-strategies/gitflow-examples/#support-branches).
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 .

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.