-
Notifications
You must be signed in to change notification settings - Fork 183
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
Support incrementing semver prereleases with 'zero' versions #9668
Conversation
ee9e4e2
to
afc11f4
Compare
The following pipelines have been queued for testing: |
The only code that depends on the artificial values appears to be: |
The following pipelines have been queued for testing: |
azd is manually incrementing versions and could move to the new overload: if ($version.IsPrerelease) {
if ($version.HasValidPrereleaseLabel()) {
# 0.1.0-beta.1 -> 0.1.0-beta.2
# 1.0.0-beta.1 -> 1.0.0-beta.2
$version.PrereleaseNumber++
} else {
# 0.1.0 -> 0.2.0-beta.1
$version.Minor++
$version.PrereleaseLabel = 'beta'
$version.PrereleaseNumber = 1
}
} else {
# 1.0.0 -> 1.1.0-beta.1
$version.IncrementAndSetToPrerelease()
} |
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 be sure to look at the existing usages and fix any that are broken by this change or that can now use your changes.
Sync eng/common directory with azure-sdk-tools for PR Azure/azure-sdk-tools#9668 See [eng/common workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow) --------- Co-authored-by: Patrick Hallisey <[email protected]>
PrereleaseLabel
andPrereleaseNumber
values from non-prerelease versionsIncrementAndSetToPrerelease($segment)
minor
HasValidPrereleaseLabel
[AzureEngSemanticVersion]::new("0.1.2").HasValidPrereleaseLabel()
would returnParse results before:
0.1.2
1.2.3
1.2.3-alpha.1
1.2.3-alpha.20250121.10
Parse results after change:
0.1.2
1.2.3
1.2.3-alpha.1
1.2.3-alpha.20250121.10