Skip to content

create separate log files for pbs client #229

create separate log files for pbs client

create separate log files for pbs client #229

Workflow file for this run

on:
push:
branches:
- main
pull_request:
branches:
- main
permissions:
contents: write
jobs:
check-and-set-guid:
runs-on: windows-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Check for GUIDs in wix.json
id: check_guid
shell: pwsh
run: |
$jsonFile = "./build/package/windows/wix.json"
$wixJson = Get-Content $jsonFile | ConvertFrom-Json
# Check if any GUID is empty
$needsGuid = $false
if ([string]::IsNullOrEmpty($wixJson.'upgrade-code') -or
[string]::IsNullOrEmpty($wixJson.files.guid) -or
[string]::IsNullOrEmpty($wixJson.shortcuts.guid)) {
$needsGuid = $true
}
if ($needsGuid) {
echo "GUIDs are missing. Setting GUIDs."
echo "needs_guid=true" | Out-File -FilePath $env:GITHUB_ENV -Append
} else {
echo "All GUIDs are set."
echo "needs_guid=false" | Out-File -FilePath $env:GITHUB_ENV -Append
}
- name: Install go-msi and set GUIDs
if: env.needs_guid == 'true'
run: |
choco install go-msi
Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
refreshenv
go-msi set-guid -p ./build/package/windows/wix.json
- name: Commit and push changes
if: env.needs_guid == 'true'
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add ./build/package/windows/wix.json
git commit -m "Set GUIDs in wix.json"
git push origin main
shell: pwsh