Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Select newest/highest version tag for building #250

Closed
cboehme opened this issue Aug 21, 2023 · 1 comment
Closed

Select newest/highest version tag for building #250

cboehme opened this issue Aug 21, 2023 · 1 comment
Assignees
Labels

Comments

@cboehme
Copy link
Contributor

cboehme commented Aug 21, 2023

I have come across an issue when building a commit which has multiple tags which are matched by a single ref config. I excepted that the maven-git-versioning-extension would select the newest tag or the highest version number. However, the tag representing the lowest version number was selected.

To illustrate: a commit is tagged with release/3.0.0 and release/3.0.1. When building this commit I expect release 3.0.1 to be built but instead version 3.0.0 is built.

I think the problem is in line 750 in GitVersioningModelProcess, where the list of tags is sorted ascendingly by the comparator defined by DefaultArtifactVersion. Before this sort happens the list of tags is sorted by the order defined in TagComparator (called in line 150 in GitUtil.java). The order defined in TagComparator is the one I expect to be used when selecting the tag for building.

@qoomon qoomon self-assigned this Aug 22, 2023
@qoomon qoomon added the bug label Aug 22, 2023
@qoomon
Copy link
Owner

qoomon commented Aug 22, 2023

Should be fixed in version 9.6.6 :-)
Thanks for reporting

@qoomon qoomon closed this as completed in 59c80d2 Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants