Skip to content

Commit

Permalink
Fix SemVer.ToString to handle v0 case
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 10, 2021
1 parent a78d368 commit a0a021b
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 a0a021b

Please sign in to comment.