Skip to content

Conversation

@sanderob
Copy link

Summary of changes

When there are several tags on one commit, the tags with common commit arrive in the opposite order when using sort=-committerdate. When using sort=committerdate, the latest tag is at the bottom of the list, but the tags arrive in the correct order, even when there are several tags on one commit.

This pull request solves #345.

For instance, with the following git log:

commit abc123 (tag: v0.0.3, tag: v0.0.2, master)
Author: github-author
Date:   Wed Jul 23 16:24:51 2025 +0200

    Commit message 2

commit xyz789 (tag: v0.0.1)
Author: github-author
Date:   Wed Jul 23 16:05:26 2025 +0200

    Commit message 1

The command git tag --list --sort=-committerdate will yield:

v0.0.2
v0.0.3
v0.0.1

And the action will try to bump from v0.0.2. However, the command git tag --list --sort=committerdate will yield:

v0.0.1
v0.0.2
v0.0.3

Which will, in combination with tail -n 1 instead of head -n 1, make the action bump from v0.0.3

Breaking Changes

Do any of the included changes break current behavior or configuration?

NO

How changes have been tested

Yes

List any unknowns

None known.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant