Files
getDomain/show_latest_release.ps1
Your Name 32efff1670 dev
2026-04-16 13:05:07 +08:00

25 lines
818 B
PowerShell

$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