-
Notifications
You must be signed in to change notification settings - Fork 588
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
Fix ReleaseNotes SemVer #2686
Fix ReleaseNotes SemVer #2686
Conversation
let nugetRegexLegacy = String.getRegEx @"([0-9]+.)+[0-9]+(-[a-zA-Z]+\d*)?(.[0-9]+)?" | ||
let nugetRegex = | ||
/// From Fake.Core.SemVer | ||
let pattern = |
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.
Can u please re-use patterns from Fake.Core.SemVer
instead of duplicating them here?
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.
Can i pull pattern
out of (|SemVer|_|)
to use it? Like such?
let pattern =
@"^(?<major>\d+)" +
@"(\.(?<minor>\d+))?" +
@"(\.(?<patch>\d+))?" +
@"(\-(?<pre>[0-9A-Za-z\-\.]+))?" +
@"(\+(?<build>[0-9A-Za-z\-\.]+))?$"
let (|SemVer|_|) version =
match version with
| ParseRegex pattern [major; minor; patch; pre; build] ->
Some [major; minor; patch; pre; build]
| _ ->
None
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.
yeah sure
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.
Review changes
Done @yazeedobaid 👍 |
Thanks a lot. |
Done @yazeedobaid 👍 Hope it worked out. |
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.
Thanks a lot
🎉 Thanks @Freymaurer ! |
Description
@aggieben, @yazeedobaid
Had to make SemVer parsing a bit more complicated, but should still be clearly understandable. I also added comments to explain certain choices.