28 lines
2.4 KiB
PowerShell
28 lines
2.4 KiB
PowerShell
param([switch]$Finalized)
|
|
$ErrorActionPreference = 'Stop'
|
|
if (-not $Finalized) { throw 'Finalized root review required' }
|
|
$taskPlan = Get-Content -Raw -LiteralPath (Join-Path $PSScriptRoot 'review-voice-release-plan.json') | ConvertFrom-Json
|
|
if (-not $taskPlan.finalized -or $taskPlan.version -ne '1.4.27') { throw 'Unfinished or wrong-version release plan' }
|
|
$taskBuildLog = Get-Content -Raw -LiteralPath (Join-Path $PSScriptRoot 'review-voice-app-build.log')
|
|
if (-not $taskBuildLog.Contains('Packaged Qt WebEngine self-check passed')) { throw 'Packaged self-check did not pass' }
|
|
$taskPython = Join-Path $taskPlan.windowsRoot '.build-venv\Scripts\python.exe'
|
|
$env:LOCALAPPDATA = Join-Path $PSScriptRoot 'qa-profile\Local'
|
|
$env:APPDATA = Join-Path $PSScriptRoot 'qa-profile\Roaming'
|
|
$env:QT_QPA_PLATFORM = 'offscreen'
|
|
$env:PYTHONDONTWRITEBYTECODE = '1'
|
|
New-Item -ItemType Directory -Path $env:LOCALAPPDATA,$env:APPDATA -Force | Out-Null
|
|
& $taskPython -B (Join-Path $PSScriptRoot 'verify_review_voice_frozen.py')
|
|
if ($LASTEXITCODE -ne 0) { throw 'Frozen module/source verification failed' }
|
|
& $taskPython -B (Join-Path $PSScriptRoot 'run_review_voice_frozen_regressions.py') *> (Join-Path $PSScriptRoot 'review-voice-frozen-runner.log')
|
|
if ($LASTEXITCODE -ne 0) { throw 'Frozen synthetic regression failed' }
|
|
$taskResults = Get-Content -Raw -LiteralPath (Join-Path $PSScriptRoot 'frozen-review-voice-tests.json') | ConvertFrom-Json
|
|
if ($taskResults.tests_run -le 0 -or $taskResults.failures -ne 0 -or $taskResults.errors -ne 0 -or $taskResults.blocked_external_actions.Count -ne 0) { throw 'Frozen regression incomplete or attempted external operation' }
|
|
if ($taskResults.skipped -gt [int]$taskPlan.allowedSkippedTests) { throw 'Unexpected skipped frozen tests' }
|
|
& $taskPython -B (Join-Path $PSScriptRoot 'verify_frozen_review_voice_notifications.py')
|
|
if ($LASTEXITCODE -ne 0) { throw 'Frozen review/manual notification tests failed' }
|
|
& $taskPython -B (Join-Path $PSScriptRoot 'verify_review_voice_nsis.py')
|
|
if ($LASTEXITCODE -ne 0) { throw 'Installer integrity failed' }
|
|
$taskOld = Join-Path $taskPlan.windowsRoot 'releases\甄AI客服-安装包-v1.4.26.exe'
|
|
if ((Get-FileHash -LiteralPath $taskOld -Algorithm SHA256).Hash.ToLowerInvariant() -ne 'a558c24f7db00ec907be46f8ce67f2d9d7bb1f60992306bfa64020e294818a38') { throw 'Old v1.4.26 installer changed' }
|
|
Write-Output 'v1.4.27 frozen modules, private-file exclusion, synthetic regressions and installer payload verified. Not installed or published.'
|