jgitver/jgitver-maven-plugin

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

lbayle opened this issue · 0 comments

lbayle commented

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:

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 ???