-
Notifications
You must be signed in to change notification settings - Fork 382
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
Sorting tags based on commit date for branch #272
Conversation
Spot on! |
Ill run some tests while looks good unsure if this is the desired behaviour when you have 0.0.5 and then start the counter from v0.0.1 it should be a v0.0.6 unless one explicitly mix custom tags with semver bumps. Maybe we could consider this a feature flag instead of direct change. Cc @sammcj any thoughts? |
I think sorting for the latest tag makes sense rather than specifically for tags that have a 'v' with --sort=-v:refname. Since the action has the WITH_V input to cater for both v and no v tags we should make the sort look for the latest and then based on the WITH_V the correct next tag will be created based on the most recent tag. This solves a problem for us and handles the case where there are old v tags hanging around but now we want to use this action and not use a v for the future tags |
Yes ill merge on Monday if thats okay I was waiting for @sammcj to comment but we can go ahead I reckon. |
Summary of changes
Changed the sorting of tags for the branch context to be based on the latest committed tag rather than the latest 'v' tag. This is to solve an issue where we had older v tags before we migrated to no v.
Without this change the last v tag is selected rather than the last tag which was causing an error.
Prior sorting for branch context :
Proposed change in this PR:
Breaking Changes
Not a breaking change
How changes have been tested
List any unknowns