You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Last tags don't filter on current branch but use all branches tags, equivalent of git tag instead of git tag --merged.
This can be fixed here net.nemerosa.versioning.git.GitInfoService#getLastTags
e.g.
List<String> getLastTags(Project project, VersioningExtension extension, String tagPattern) {
// Git access
//noinspection GroovyAssignabilityCheck
def grgit = Grgit.open(currentDir: getGitDirectory(extension, project))
def branchCommits = grgit.log(maxCommits: 10000)*.id
// List all tags
return grgit.tag.list()
// ... filters using the pattern and commits from current branch
.findAll { (it.name =~ tagPattern).find() && branchCommits.contains(it.commit.id) }
.sort{ a,b ->
// ... sort by desc commit time
b.commit.dateTime.toEpochSecond() <=> a.commit.dateTime.toEpochSecond() ?:
// ... (#36) commit time is not enough. We have also to consider the case where several pattern compliant tags
// ... are on the same commit, and we must sort them by desc version
TagSupport.tagOrder(tagPattern, b.name) <=> TagSupport.tagOrder(tagPattern, a.name)
// ... gets their name only
}*.name
}
The text was updated successfully, but these errors were encountered:
Last tags don't filter on current branch but use all branches tags, equivalent of
git tag
instead ofgit tag --merged
.This can be fixed here net.nemerosa.versioning.git.GitInfoService#getLastTags
e.g.
The text was updated successfully, but these errors were encountered: