Skip to content
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

Feature Request: constraint support for filtering prerelease strings #21

Open
scottTomaszewski opened this issue Nov 21, 2024 · 0 comments

Comments

@scottTomaszewski
Copy link

I have a use case where there are multiple versions with the same semver core version, but different prerelease strings. The prerelease strings have some metadata in them for uniqueness purposes, but the most important differentiator is the branch name being included in it. For example, I may have tags like the following:

1.2.3-1-main
1.2.3-1-develop
1.2.3-2-main

If possible, can you add support for filtering prerelease strings in the version constraint for operations like max? As an example, if I wanted to get the latest tag generated on the main branch (prerelease version contains main), I would do something like

tags=$(git ...)
echo "$tags" | sver max "1.2.3, pre(*main*)"

Or something similar. Could be regex, globbing, etc

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

No branches or pull requests

1 participant