File tree Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Expand file tree Collapse file tree 2 files changed +16
-2
lines changed Original file line number Diff line number Diff line change 20
20
Select-Object -ExpandProperty Node).InnerText
21
21
$versions = $version.Split('.')
22
22
$versionMasks = "${{ inputs.version_mask }}".Split('.')
23
- $newVersion = "$([int]$versions[0] + [int]$versionMasks[0]).$([int]$versions[1] + [int]$versionMasks[1]).$([int]$versions[2] + [int]$versionMasks[2]).$([int]$versions[3] + [int]$versionMasks[3])"
23
+ $bumped = $false
24
+ for ($i = 0; $i -le 3; $i++) {
25
+ if ($bumped) {
26
+ $versions[$i] = "0"
27
+ continue
28
+ }
29
+ $v = [int]$version[$i]
30
+ $vm = [int]$versionMasks[$i]
31
+ if ($vm -gt 0) {
32
+ $v = $v + $vm
33
+ $bumped = $true
34
+ }
35
+ $versions[$i] = [string]$v
36
+ }
37
+ $newVersion = [System.String]::Join('.', $versions)
24
38
Set-Content -Path ${{ inputs.version_file }} -Value "<Version>$newVersion</Version>"
25
39
Add-Content -Path "$env:GITHUB_OUTPUT" -Value "old-version=$version"
26
40
Add-Content -Path "$env:GITHUB_OUTPUT" -Value "new-version=$newVersion"
Original file line number Diff line number Diff line change 48
48
$full_ver=if ("${{ inputs.pre_release }}" -eq "true") {
49
49
"$lib_ver-${{ env.VERSION_SUFFIX }}"
50
50
} else {
51
- ""
51
+ "$lib_ver "
52
52
}
53
53
$tag="v$full_ver"
54
54
Add-Content -Path "$env:GITHUB_ENV" -Value "LIBRARY_VERSION=$lib_ver"
You can’t perform that action at this time.
0 commit comments