1
0
mirror of https://github.com/bitwarden/desktop.git synced 2024-11-24 11:55:50 +01:00
bitwarden-desktop/.github/scripts/macos/increment-version.ps1

9 lines
510 B
PowerShell
Raw Normal View History

2020-09-22 22:00:58 +02:00
$rootPath = $env:GITHUB_WORKSPACE;
2020-09-28 17:11:34 +02:00
$packagePath = "$rootPath\package.json";
$buildNumber = 500 + [int]$env:GITHUB_RUN_NUMBER;
2020-09-23 18:44:57 +02:00
Write-Output "Setting build number to $buildNumber";
2020-11-03 19:29:00 +01:00
Write-Output "BUILD_NUMBER=$buildNumber" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append;
2020-09-28 17:11:34 +02:00
$package = Get-Content -Raw -Path $packagePath | ConvertFrom-Json;
$package.build | Add-Member -MemberType NoteProperty -Name buildVersion -Value "$buildNumber";
$package | ConvertTo-Json -Depth 32 | Set-Content $packagePath;