jgitver / jgitver/jgitver-maven-plugin

default regexVersionTag does not handle "v1.0.0-RC1" correctly on 2nd commit

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

Description

**version**: 1.9.0

**usage context**:

- [] maven command line: 3.9.6

**Problem description**:

the default regex has `(?:-[a-zA-Z0-9\\-_]+)?` inside the capture group. This is nice for RC.
But it works only on the commit that is tagged. on next commits, the RC has vanished !

**UseCase**:
```bash
git tag "1.2.0-RC1"
mvn validate
# ==> Building my-app 1.2.0-RC1-SNAPSHOT
touch foobar.txt && git add foobar.txt && git commit -m "add foobar"
mvn validate
# ==> Building my-app 1.2.0-SNAPSHOT
```
where is `-RC1` ???

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.