|
1 | 1 | # |
2 | | -# Creates the Chocolatey package version based on assembly version, |
| 2 | +# Creates the Chocolatey package, sets the version based on assembly version, |
3 | 3 | # and whether there is already a CI revision set. |
4 | 4 | # |
5 | 5 | param([String]$pat, [String]$targetPackageName = 'typewriter') |
@@ -40,21 +40,21 @@ $packageFeedNormalizedVersionParts = $packageFeedNormalizedVersion.Split('-') |
40 | 40 |
|
41 | 41 | # Check whether the assembly version and feed version match. |
42 | 42 | if ($packageFeedNormalizedVersionParts[0] -eq $assemblySemver) { |
43 | | - # The assembly version and feed version match. |
| 43 | + # The assembly version and feed version match. We'll need to either set the initial ci revision or increment it. |
44 | 44 |
|
45 | 45 | # Check whether the latest package in the feed has been updated with a ci release, eg '-ci*' |
46 | 46 | if ($packageFeedNormalizedVersionParts.length -eq 1) { |
47 | | - # Append the starting ci revision. |
| 47 | + # Append the initial ci revision. |
48 | 48 | $finalPackageVersion = $assemblySemver + $ciToken + "0" |
49 | 49 | } |
50 | 50 | else { |
51 | | - # increment the ci revision, eg "0.1.2-ci3" become "0.1.2-ci4" |
| 51 | + # Increment the ci revision, eg "0.1.2-ci3" becomes "0.1.2-ci4" |
52 | 52 | $number = $packageFeedNormalizedVersionParts[1].Remove(0, 2) -as [int] # removing 'ci' |
53 | 53 | $finalPackageVersion = $assemblySemver + $ciToken + ($number += 1) |
54 | 54 | } |
55 | 55 |
|
56 | 56 | } |
57 | | -# The don't match so just use the assembly version. |
| 57 | +# They don't match so just use the assembly version. |
58 | 58 | else { |
59 | 59 | $finalPackageVersion = $assemblySemver |
60 | 60 | } |
|
0 commit comments