Skip to content

Commit

Permalink
Fix version files when generating release notes (#85264)
Browse files Browse the repository at this point in the history
Closes #85227. The git label version filter didn't take into account
snapshot versions. Now it does.
  • Loading branch information
pugnascotia committed Mar 23, 2022
1 parent f7138ac commit 19e1e43
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,10 @@ static Map<QualifiedVersion, Set<File>> partitionFilesByVersion(

final List<QualifiedVersion> earlierVersions = gitWrapper.listVersions(tagWildcard)
// Only keep earlier versions, and if `currentVersion` is a prerelease, then only prereleases too.
.filter(each -> each.isBefore(currentVersion) && (currentVersion.hasQualifier() == each.hasQualifier()))
.filter(
each -> each.isBefore(currentVersion)
&& (currentVersion.isSnapshot() || (currentVersion.hasQualifier() == each.hasQualifier()))
)
.sorted(naturalOrder())
.toList();

Expand Down

0 comments on commit 19e1e43

Please sign in to comment.