2020-09-22 22:00:58 +02:00
|
|
|
|
$rootPath = $env:GITHUB_WORKSPACE;
|
2020-09-28 17:11:34 +02:00
|
|
|
|
$packagePath = "$rootPath\package.json";
|
2021-01-22 21:53:05 +01:00
|
|
|
|
$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;
|