This commit is contained in:
2026-10-29 18:43:29 +02:00
parent f77900e198
commit 78e89a51d2
75 changed files with 2881 additions and 14 deletions
+10 -4
View File
@@ -1,4 +1,4 @@
param([ValidateSet('start','stop')][string]$Action = 'start', [ValidateRange(1024,65535)][int]$Port = 8001, [switch]$ResumeIndustrialBudget)
param([ValidateSet('start','stop')][string]$Action = 'start', [ValidateRange(1024,65535)][int]$Port = 8001, [switch]$ResumeIndustrialBudget, [switch]$ProductDemo)
$ErrorActionPreference = 'Stop'
$sgfProject = [IO.Path]::GetFullPath((Join-Path $PSScriptRoot '..'))
if ($sgfProject -ne 'C:\laragon\www\sgf-tempo') { throw 'Unexpected project path.' }
@@ -17,13 +17,19 @@ if ($Action -eq 'stop') {
Remove-Item -LiteralPath $recordFile
}
$fixtureFile = 'C:\laragon\data\sgf-tempo\secrets\browser-fixture.json'
if (Test-Path -LiteralPath $fixtureFile) { Remove-Item -LiteralPath $fixtureFile }
Write-Output 'Browser proof server stopped. Synthetic data remains only in sgf_tempo_test until the next test run.'
if (Test-Path -LiteralPath $fixtureFile) {
$fixture = Get-Content -LiteralPath $fixtureFile -Raw | ConvertFrom-Json
if (!$fixture.product_demo) { Remove-Item -LiteralPath $fixtureFile }
}
Write-Output 'Browser proof server stopped. Synthetic data remains in sgf_tempo_test; integrated demo manifests are preserved.'
exit 0
}
if (Get-NetTCPConnection -LocalPort $Port -State Listen -ErrorAction SilentlyContinue) { throw "Port $Port occupied; no process was stopped." }
if (Test-Path -LiteralPath $recordFile) { throw 'Browser proof record exists; stop that proof first.' }
if ($ResumeIndustrialBudget) {
if ($ProductDemo -and $ResumeIndustrialBudget) { throw 'Choose one demonstration mode.' }
if ($ProductDemo) {
& $sgfPhp scripts/product-demo.php --env=testing
} elseif ($ResumeIndustrialBudget) {
& $sgfPhp scripts/industrial-budget-manual-prepare.php --env=testing
} else {
& $sgfPhp scripts/prepare-browser-fixture.php --env=testing