File tree 1 file changed +12
-12
lines changed
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
+
1
12
$revision = @ { $true = $env: APPVEYOR_BUILD_NUMBER ; $false = 1 }[$env: APPVEYOR_BUILD_NUMBER -ne $NULL ];
2
13
$revision = " {0:D4}" -f [convert ]::ToInt32($revision , 10 )
3
14
@@ -15,20 +26,9 @@ echo "VERSION-SUFFIX: alpha1-$revision"
15
26
If ($env: APPVEYOR_REPO_TAG -eq $true ) {
16
27
echo " RUNNING dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts "
17
28
$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
19
30
}
20
31
Else {
21
32
echo " RUNNING dotnet pack .\src\JsonApiDotNetCore -c Release -o .\artifacts --version-suffix=alpha1-$revision "
22
33
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
34
34
}
You can’t perform that action at this time.
0 commit comments