Skip to content

Commit

Permalink
Fix SemVer.ToString to handle v0 case (#2006)
Browse files Browse the repository at this point in the history
Since we are treating v0 versions as prerelease we need to make sure
we don't accidently start to add the bogus prerelease label in cases where
we call ToString() on the version.
  • Loading branch information
weshaggard authored Sep 13, 2021
1 parent e2103d5 commit 83072de
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion eng/common/scripts/SemVer.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ class AzureEngSemanticVersion : IComparable {
{
$versionString = "{0}.{1}.{2}" -F $this.Major, $this.Minor, $this.Patch

if ($this.IsPrerelease)
if ($this.IsPrerelease -and $this.PrereleaseLabel -ne "zzz")
{
$versionString += $this.PrereleaseLabelSeparator + $this.PrereleaseLabel + `
$this.PrereleaseNumberSeparator + $this.PrereleaseNumber
Expand Down

0 comments on commit 83072de

Please sign in to comment.