From 9f357cb2acc8fc1fe24bdafbb78b5005b39e5fd5 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 28 Sep 2020 11:11:34 -0400 Subject: [PATCH] increment build.buildVersion --- .github/scripts/macos/increment-version.ps1 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/scripts/macos/increment-version.ps1 b/.github/scripts/macos/increment-version.ps1 index 5d1b4016ea..40e2a236ad 100644 --- a/.github/scripts/macos/increment-version.ps1 +++ b/.github/scripts/macos/increment-version.ps1 @@ -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;