File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -116,14 +116,16 @@ function BumpSuffix([string] $oldSuffix) {
116
116
117
117
# A suffix is a dash '-', then a sequcence of word characters followed by an optional number
118
118
# Example:
119
- # -alpha => -alpha2
120
- # -alpha1 => -alpha2
119
+ # -alpha => -alpha002
120
+ # -alpha1 => -alpha002
121
121
$match = [regex ]::Match($oldSuffix , ' ^-([a-zA-Z]+)(\d+)?$' );
122
122
$oldSuffix = $match.Groups [1 ].Value
123
123
$numberGroup = $match.Groups [2 ]
124
124
125
125
$number = if ($numberGroup.Success ) { 1 + $match.Groups [2 ].Value } else { 2 }
126
- return [string ]::Format(" -{0}{1}" , $oldSuffix , $number )
126
+
127
+ # Use 3 digits for the number "-alpha003", for 999 releases lexically sorted.
128
+ return [string ]::Format(" -{0}{1:D3}" , $oldSuffix , $number )
127
129
}
128
130
129
131
# Returns object with properties: Version, Suffix
You can’t perform that action at this time.
0 commit comments