dev
This commit is contained in:
35
prepare_final_release.ps1
Normal file
35
prepare_final_release.ps1
Normal file
@@ -0,0 +1,35 @@
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$root = Split-Path -Parent $MyInvocation.MyCommand.Path
|
||||
$releaseRoot = Join-Path $root "release"
|
||||
$reportPath = Join-Path $releaseRoot "final_release_report.json"
|
||||
|
||||
New-Item -ItemType Directory -Force -Path $releaseRoot | Out-Null
|
||||
|
||||
powershell -ExecutionPolicy Bypass -File (Join-Path $root "package_domain_release.ps1")
|
||||
|
||||
$latestJsonPath = Join-Path $releaseRoot "latest_release.json"
|
||||
if (-not (Test-Path -LiteralPath $latestJsonPath)) {
|
||||
throw "latest_release.json not found"
|
||||
}
|
||||
|
||||
$latest = Get-Content -LiteralPath $latestJsonPath -Raw | ConvertFrom-Json
|
||||
|
||||
$verifyOutput = powershell -ExecutionPolicy Bypass -File (Join-Path $root "verify_domain_release.ps1") `
|
||||
-ZipPath $latest.zip_path `
|
||||
-HashPath $latest.sha256_path
|
||||
|
||||
$verify = $verifyOutput | ConvertFrom-Json
|
||||
|
||||
$report = [ordered]@{
|
||||
generated_at = (Get-Date).ToString("s")
|
||||
ok = [bool]$verify.ok
|
||||
latest_release = $latest
|
||||
verify = $verify
|
||||
}
|
||||
|
||||
$report | ConvertTo-Json -Depth 8 | Set-Content -LiteralPath $reportPath -Encoding UTF8
|
||||
|
||||
Write-Host "final release prepared"
|
||||
Write-Host "report: $reportPath"
|
||||
Write-Host "ok: $($verify.ok)"
|
||||
Reference in New Issue
Block a user