Skip to content

fix: ignore other prerelease tags when finding latest tag #213

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

Merged
merged 1 commit into from
Apr 9, 2025

Conversation

jaakkotuosa
Copy link

This relates to issue #211

If we have already git tags:

  • v1.0.0-a.0
  • v1.0.0-b.0
    and then try to determine the next tag for prerelease a, we get v1.0.0-a.0 (which already exists).
    This is because lib/latest-semver-tag.js was returning the latest tag, even if it was different prerelease (b in this case).

This PR adds filtering to remove prerelease tags for different prereleases, and only then selecting latest

@jaakkotuosa jaakkotuosa changed the title fix: ignore other prerelease tags when finding latest tag (#211) fix: ignore other prerelease tags when finding latest tag Mar 10, 2025
@TimothyJones
Copy link
Member

Thanks for this! Would you be able to add documentation for it to the readme, please?

@jaakkotuosa
Copy link
Author

Thanks! As for documentation, I am not sure what would be useful. I guess we could say in https://github.com/absolute-version/commit-and-tag-version?tab=readme-ov-file#release-as-a-pre-release something like "you can use different prerelease names" (too obvious?) or then add an example block for beta release (but that would would pretty much identical to the block for the alpha release). Any ideas?

@TimothyJones
Copy link
Member

Good point, this is probably just how people would expect it to work.

@TimothyJones TimothyJones merged commit 1bcdf40 into absolute-version:master Apr 9, 2025
6 checks passed
@TimothyJones
Copy link
Member

Released in 12.5.1

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.

2 participants