File tree Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Expand file tree Collapse file tree 1 file changed +12
-12
lines changed Original file line number Diff line number Diff line change 1+ # Gets the version suffix from the repo tag
2+ # example: v1.0.0-preview1-final => preview1-final
3+ function Get-Version-Suffix-From-Tag
4+ {
5+ $tag = $env: APPVEYOR_REPO_TAG_NAME
6+ $split = $tag -split " -"
7+ $suffix = $split [1 .. 2 ]
8+ $final = $suffix -join " -"
9+ return $c
10+ }
11+
112$revision = @ { $true = $env: APPVEYOR_BUILD_NUMBER ; $false = 1 }[$env: APPVEYOR_BUILD_NUMBER -ne $NULL ];
213$revision = " {0:D4}" -f [convert ]::ToInt32($revision , 10 )
314
@@ -15,20 +26,9 @@ echo "VERSION-SUFFIX: alpha1-$revision"
1526If ($env: APPVEYOR_REPO_TAG -eq $true ) {
1627 echo " RUNNING dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts "
1728 $revision = Get-Version - Suffix- From- Tag
18- dotnet pack .\src\JsonApiDotNetCore - c Release - o .\artifacts -- version- suffix= alpha1 - $revision
29+ dotnet pack .\src\JsonApiDotNetCore - c Release - o .\artifacts -- version- suffix= $revision
1930}
2031Else {
2132 echo " RUNNING dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts --version-suffix=alpha1-$revision "
2233 dotnet pack .\src\JsonApiDotNetCore - c Release - o .\artifacts -- version- suffix= alpha1- $revision
23- }
24-
25- # Gets the version suffix from the repo tag
26- # example: v1.0.0-preview1-final => preview1-final
27- function Get-Version-Suffix-From-Tag
28- {
29- $tag = $env: APPVEYOR_REPO_TAG_NAME
30- $split = $tag -split " -"
31- $suffix = $split [1 .. 2 ]
32- $final = $suffix -join " -"
33- return $c
3434}
You can’t perform that action at this time.
0 commit comments