-
Notifications
You must be signed in to change notification settings - Fork 16
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
Fixed regex for matching versions #253
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -295,7 +295,7 @@ export const getOptions = () => { | |
), | ||
micromambaVersion: parseOrUndefined( | ||
'micromamba-version', | ||
z.union([z.literal('latest'), z.string().regex(/^\d+\.\d+\.\d+-\d+$/)]), | ||
z.union([z.literal('latest'), z.string().regex(/^\d+\.\d+\.\d+(?:\.(?:rc|alpha|beta)\d+)?-\d+$/)]), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we add |
||
'micromamba-version must be either `latest` or a version matching `1.2.3-0`.' | ||
), | ||
micromambaUrl: parseOrUndefined('micromamba-url', z.string().url()), | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To match PEP440 version numbers of release candidates, alphas, and betas (for instance
2.0.0rc0
):There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not work. I think it's rather^\d+\.\d+\.\d+(?:\.?(?:rc|alpha|beta)\d*)?-\d+$
(yes, I let you find the single character I had to change :D)My bad, I entered wrong matches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's go. :)