$ErrorActionPreference = "Stop" $root = Split-Path -Parent $MyInvocation.MyCommand.Path $releaseRoot = Join-Path $root "release" $latestJsonPath = Join-Path $releaseRoot "latest_release.json" $finalReportPath = Join-Path $releaseRoot "final_release_report.json" if (-not (Test-Path -LiteralPath $latestJsonPath)) { throw "latest_release.json not found" } $latest = Get-Content -LiteralPath $latestJsonPath -Raw | ConvertFrom-Json $report = $null if (Test-Path -LiteralPath $finalReportPath) { $report = Get-Content -LiteralPath $finalReportPath -Raw | ConvertFrom-Json } $summary = [ordered]@{ latest_release = $latest final_release_ok = if ($report) { [bool]$report.ok } else { $null } final_release_report = if ($report) { $finalReportPath } else { "" } } $summary | ConvertTo-Json -Depth 8