File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -14,9 +14,21 @@ echo "VERSION-SUFFIX: alpha1-$revision"
1414
1515If ($env: APPVEYOR_REPO_TAG -eq $true ) {
1616 echo " RUNNING dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts "
17- dotnet pack .\src\JsonApiDotNetCore - c Release - o .\artifacts
17+ $revision = Get-Version - Suffix- From- Tag
18+ dotnet pack .\src\JsonApiDotNetCore - c Release - o .\artifacts -- version- suffix= alpha1- $revision
1819}
1920Else {
2021 echo " RUNNING dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts --version-suffix=alpha1-$revision "
2122 dotnet pack .\src\JsonApiDotNetCore - c Release - o .\artifacts -- version- suffix= alpha1- $revision
2223}
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
34+ }
You can’t perform that action at this time.
0 commit comments