2020-09-22 22:00:58 +02:00
|
|
|
|
$rootPath = $env:GITHUB_WORKSPACE;
|
2020-09-28 17:11:34 +02:00
|
|
|
|
$packagePath = "$rootPath\package.json";
|
2020-09-22 22:00:58 +02:00
|
|
|
|
$buildNumber = 100 + [int]$env:GITHUB_RUN_NUMBER;
|
2020-09-23 18:44:57 +02:00
|
|
|
|
Write-Output "Setting build number to $buildNumber";
|
2020-09-28 19:22:17 +02:00
|
|
|
|
Write-Output "::set-env name=BUILD_NUMBER::$buildNumber";
|
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;
|