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

feat: support arbitrary prerelease strings #342

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cjnosal
Copy link

@cjnosal cjnosal commented Jun 9, 2023

The current implementation assumes the prerelease portion of a semver tag is alpha/beta/rc optionally followed by a variant, with no other - characters. This MR adds two new source params to broaden support for arbitrary semver tags while maintaining backwards compatibility:

source.pre_release_prefixes lets the user append to the default prefixes of alpha/beta/rc (e.g. "dev" or "build")without otherwise changing the current pre_releases behaviour. Setting pre_release_prefixes skips the "pre-release contains -" check.

source.tag_regex lets users match against arbitrary expressions. source.pre_releases is ignored when a regex is set. semver_constraint and variant can still be used in combination with tag_regex.

fix #307

Allow the user to opt into checking for prefixes other than the default
alpha/beta/rc.
Opting in additionally allows for prereleases containing '-' delimeters as
allowed by Semver 2.0.0.

Signed-off-by: Conor Nosal <[email protected]>
Match arbitrary tags. Takes precendence over pre_releases.

Signed-off-by: Conor Nosal <[email protected]>
@cjnosal cjnosal changed the title Prereleaseprefixes feat: support arbitrary prerelease strings Jun 9, 2023
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.

add broader support for semver constraints
1 participant