42 lines
1.7 KiB
PowerShell
42 lines
1.7 KiB
PowerShell
$ErrorActionPreference = 'Stop'
|
|
$projectRoot = Split-Path -Parent (Split-Path -Parent $PSScriptRoot)
|
|
$scriptPath = Join-Path $projectRoot 'scripts\package-aug1-release.ps1'
|
|
$devSetupPath = Join-Path $projectRoot 'docs\DEV_SETUP.md'
|
|
$source = Get-Content -Raw -Encoding UTF8 -LiteralPath $scriptPath
|
|
|
|
$requiredFragments = @(
|
|
'Runtime commit must be an ancestor of the operations commit',
|
|
'Frozen evidence is not release eligible',
|
|
'Frozen APK hash mismatch',
|
|
'Frozen backend JAR hash mismatch',
|
|
'Content candidate hash mismatch',
|
|
"'operations/release-backend.sh'",
|
|
"'operations/release-preflight.sh'",
|
|
"'operations/verify-aug1-production-api-readonly.sh'",
|
|
"'operations/capture-android-acceptance.ps1'",
|
|
"'operations/go-no-go.md'",
|
|
'Release package already exists and will not be overwritten',
|
|
'Release package expected 14 files',
|
|
'ZIP entry hash mismatch',
|
|
'package_verified=true'
|
|
)
|
|
foreach ($fragment in $requiredFragments) {
|
|
if (-not $source.Contains($fragment)) {
|
|
throw "August 1 packager is missing required fragment: $fragment"
|
|
}
|
|
}
|
|
|
|
if ($source -match 'Compress-Archive') {
|
|
throw 'August 1 packager must use sorted entries and a fixed timestamp, not Compress-Archive.'
|
|
}
|
|
if ($source -match '\[switch\]\$Force') {
|
|
throw 'August 1 packager must not expose an overwrite switch.'
|
|
}
|
|
|
|
$devSetup = Get-Content -Raw -Encoding UTF8 -LiteralPath $devSetupPath
|
|
if (-not $devSetup.Contains('.\scripts\package-aug1-release.ps1')) {
|
|
throw 'DEV_SETUP is missing the August 1 release packaging command.'
|
|
}
|
|
|
|
Write-Output 'PASS: August 1 release packager freezes runtime and operations separately without overwriting prior packages'
|