File tree 1 file changed +13
-1
lines changed
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"
14
14
15
15
If ($env: APPVEYOR_REPO_TAG -eq $true ) {
16
16
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
18
19
}
19
20
Else {
20
21
echo " RUNNING dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts --version-suffix=alpha1-$revision "
21
22
dotnet pack .\src\JsonApiDotNetCore - c Release - o .\artifacts -- version- suffix= alpha1- $revision
22
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
34
+ }
You can’t perform that action at this time.
0 commit comments