File tree 3 files changed +43
-1
lines changed
3 files changed +43
-1
lines changed Original file line number Diff line number Diff line change
1
+ coverage :
2
+ status :
3
+ project :
4
+ default :
5
+ informational : true
6
+ patch :
7
+ default :
8
+ informational : true
Original file line number Diff line number Diff line change 26
26
runs-on : ${{ matrix.os }}
27
27
strategy :
28
28
matrix :
29
- os : [windows-latest, ubuntu-latest, macos -latest]
29
+ os : [ubuntu-latest]
30
30
31
31
steps :
32
32
- uses : actions/checkout@v3
Original file line number Diff line number Diff line change
1
+ Function GetBuildVersion {
2
+ Param (
3
+ [string ]$VersionString
4
+ )
5
+
6
+ # Process through regex
7
+ $VersionString -match " (?<major>\d+)(\.(?<minor>\d+))?(\.(?<patch>\d+))?(\-(?<pre>[0-9A-Za-z\-\.]+))?(\+(?<build>\d+))?" | Out-Null
8
+
9
+ if ($matches -eq $null ) {
10
+ return " 1.0.0-build"
11
+ }
12
+
13
+ # Extract the build metadata
14
+ $BuildRevision = [uint64 ]$matches [' build' ]
15
+ # Extract the pre-release tag
16
+ $PreReleaseTag = [string ]$matches [' pre' ]
17
+ # Extract the patch
18
+ $Patch = [uint64 ]$matches [' patch' ]
19
+ # Extract the minor
20
+ $Minor = [uint64 ]$matches [' minor' ]
21
+ # Extract the major
22
+ $Major = [uint64 ]$matches [' major' ]
23
+
24
+ $Version = [string ]$Major + ' .' + [string ]$Minor + ' .' + [string ]$Patch ;
25
+ if ($PreReleaseTag -ne [string ]::Empty) {
26
+ $Version = $Version + ' -' + $PreReleaseTag
27
+ }
28
+
29
+ if ($BuildRevision -ne 0 ) {
30
+ $Version = $Version + ' .' + [string ]$BuildRevision
31
+ }
32
+
33
+ return $Version
34
+ }
You can’t perform that action at this time.
0 commit comments