increment build.buildVersion

This commit is contained in:
Kyle Spearrin 2020-09-28 11:11:34 -04:00
parent 694237536b
commit 9f357cb2ac
1 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,7 @@
$rootPath = $env:GITHUB_WORKSPACE;
$packagePath = "$rootPath\package.json";
$buildNumber = 100 + [int]$env:GITHUB_RUN_NUMBER;
# See https://www.electron.build/configuration/configuration#configuration
Write-Output "Setting build number to $buildNumber";
Write-Output "::set-env name=BUILD_NUMBER::$buildNumber";
$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;