Skip to content

Commit

Permalink
fix: fix tag sorting by version (fixes #250)
Browse files Browse the repository at this point in the history
  • Loading branch information
qoomon committed Sep 7, 2023
1 parent 7927c9a commit 59c80d2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

# Changelog

## 9.6.6

##### Fixes
- fix tag sorting by version (fixes #250)


## 9.6.5

##### Fixes
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ create or update `${rootProjectDir}/.mvn/extensions.xml` file
<extension>
<groupId>me.qoomon</groupId>
<artifactId>maven-git-versioning-extension</artifactId>
<version>9.6.5</version>
<version>9.6.6</version>
</extension>

</extensions>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

<groupId>me.qoomon</groupId>
<artifactId>maven-git-versioning-extension</artifactId>
<version>9.6.5</version>
<version>9.6.6</version>
<packaging>maven-plugin</packaging>

<name>Maven Git Versioning Extension</name>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -746,8 +746,7 @@ protected void addTag(String tag) {
}

private static GitVersionDetails getGitVersionDetails(GitSituation gitSituation, Configuration config) {
final Lazy<List<String>> sortedTags = Lazy.by(() -> gitSituation.getTags().stream()
.sorted(comparing(DefaultArtifactVersion::new)).collect(toList()));
final Lazy<List<String>> sortedTags = Lazy.by(gitSituation::getTags);
for (RefPatchDescription refConfig : config.refs.list) {
switch (refConfig.type) {
case TAG: {
Expand Down

0 comments on commit 59c80d2

Please sign in to comment.