Skip to content

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

Merged
TimothyJones merged 1 commit intoabsolute-version:masterfrom
jaakkotuosa:prerelease
Apr 9, 2025
Merged

fix: ignore other prerelease tags when finding latest tag#213
TimothyJones merged 1 commit intoabsolute-version:masterfrom
jaakkotuosa:prerelease

Conversation

@jaakkotuosa
Copy link
Copy Markdown
Contributor

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
Copy Markdown
Member

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

@jaakkotuosa
Copy link
Copy Markdown
Contributor 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
Copy Markdown
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
Copy Markdown
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