jgitver / jgitver/jgitver-maven-plugin
Inconsistent release calculation when tag is on current commit
- Dominant language
- Groovy
- Stars
- 166
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
## Issue
We know that your time is precious, we are thankful that you take time to report us an issue, to make it easier for you please use the following prefilled paragraphs
**version**: 1.5.1
**usage context**:
- [x ] maven command line: 3.6.1
**Problem description**:
To reproduce. start by creating a repo as outlined in the "Example" section of the readme. Make an initial checkin and commit. Then add a tag with something extra. I used `1.0.0-start`.
The calculated version will be: `1.0.0-start-SNAPSHOT`. Make an additional commit, and check again. This time it's `1.0.0-SNAPSHOT`, i.e. the `-start` part is no longer there.
This is inconsistent and as far I can say, the first one of the calculated versions is incorrect.
```
TIPD_9 C:\data\Dev\Code\jgitver-tester>mvn validate
[INFO] No suitable configuration file found, using defaults
[INFO] Using jgitver-maven-plugin [1.5.1] (sha1: e45d1669b39cedb98720dd33cc14d0185b455ca1)
[INFO] version '0.0.0-SNAPSHOT' computed in 2439 ms
[INFO]
[INFO] Scanning for projects...
[INFO] jgitver-maven-plugin is about to change project(s) version(s)
[INFO] com.example::jgitver-tester::0 -> 0.0.0-SNAPSHOT
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building jgitver-tester 0.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.126 s
[INFO] Finished at: 2019-12-12T09:23:19+01:00
[INFO] Final Memory: 15M/1984M
[INFO] ------------------------------------------------------------------------
TIPD_9 C:\data\Dev\Code\jgitver-tester>git tag 1.0.0-start
TIPD_9 C:\data\Dev\Code\jgitver-tester>mvn validate
[INFO] No suitable configuration file found, using defaults
[INFO] Using jgitver-maven-plugin [1.5.1] (sha1: e45d1669b39cedb98720dd33cc14d0185b455ca1)
[INFO] version '1.0.0-start-SNAPSHOT' computed in 2623 ms
[INFO]
[INFO] Scanning for projects...
[INFO] jgitver-maven-plugin is about to change project(s) version(s)
[INFO] com.example::jgitver-tester::0 -> 1.0.0-start-SNAPSHOT
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building jgitver-tester 1.0.0-start-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.311 s
[INFO] Finished at: 2019-12-12T09:23:38+01:00
[INFO] Final Memory: 15M/1984M
[INFO] ------------------------------------------------------------------------
TIPD_9 C:\data\Dev\Code\jgitver-tester>git commit --allow-empty -m "Force new commit"
[master aabe9e1] Force new commit
TIPD_9 C:\data\Dev\Code\jgitver-tester>mvn validate
[INFO] No suitable configuration file found, using defaults
[INFO] Using jgitver-maven-plugin [1.5.1] (sha1: e45d1669b39cedb98720dd33cc14d0185b455ca1)
[INFO] version '1.0.0-SNAPSHOT' computed in 2851 ms
[INFO]
[INFO] Scanning for projects...
[INFO] jgitver-maven-plugin is about to change project(s) version(s)
[INFO] com.example::jgitver-tester::0 -> 1.0.0-SNAPSHOT
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building jgitver-tester 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.746 s
[INFO] Finished at: 2019-12-12T09:24:51+01:00
[INFO] Final Memory: 15M/1984M
[INFO] ------------------------------------------------------------------------
```
Contributor guide
Assessment
This issue has not been assessed yet.