Skip to content

Commit ec92967

Browse files
Fix SemVer.ToString to handle v0 case (Azure#24101)
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. Co-authored-by: Wes Haggard <weshaggard@users.noreply.github.com>
1 parent 7285951 commit ec92967

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eng/common/scripts/SemVer.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class AzureEngSemanticVersion : IComparable {
136136
{
137137
$versionString = "{0}.{1}.{2}" -F $this.Major, $this.Minor, $this.Patch
138138

139-
if ($this.IsPrerelease)
139+
if ($this.IsPrerelease -and $this.PrereleaseLabel -ne "zzz")
140140
{
141141
$versionString += $this.PrereleaseLabelSeparator + $this.PrereleaseLabel + `
142142
$this.PrereleaseNumberSeparator + $this.PrereleaseNumber

0 commit comments

Comments
 (0)