Prepare Linux delivery and correct lifecycle rendering build types

This commit is contained in:
2026-09-11 07:53:42 -07:00
parent cb611a71df
commit 29084050a7
41 changed files with 1120 additions and 25 deletions
@@ -1,3 +1,4 @@
#requires -Version 7.0
param([Parameter(Mandatory=$true)][string]$ServerExe)
$ErrorActionPreference = 'Stop'
$taskRoot = (Resolve-Path (Join-Path $PSScriptRoot '../../..')).Path
@@ -21,7 +22,16 @@ $codes = @($payload.expected | ForEach-Object { $_.code })
function Assert-Probe($condition,[string]$message) { if (-not $condition) { throw $message } }
function Start-ProbeServer {
$script:launch++
$script:probeProcess = Start-Process -FilePath $exe -ArgumentList @('--bind',"127.0.0.1:$probePort",'--data-dir',('"'+$storePath+'"'),'--token-file',('"'+$tokenPath+'"')) -WindowStyle Hidden -PassThru -RedirectStandardOutput (Join-Path $runRoot "server-$script:launch.stdout.log") -RedirectStandardError (Join-Path $runRoot "server-$script:launch.stderr.log")
$startOptions = @{
FilePath = $exe
ArgumentList = @('--bind',"127.0.0.1:$probePort",'--data-dir',('"'+$storePath+'"'),'--token-file',('"'+$tokenPath+'"'))
PassThru = $true
RedirectStandardOutput = Join-Path $runRoot "server-$script:launch.stdout.log"
RedirectStandardError = Join-Path $runRoot "server-$script:launch.stderr.log"
}
# WindowStyle is Windows-only; Unix keeps the child attached to this probe.
if ($IsWindows) { $startOptions.WindowStyle = 'Hidden' }
$script:probeProcess = Start-Process @startOptions
for ($attempt = 0; $attempt -lt 40; $attempt++) {
if ($script:probeProcess.HasExited) { throw 'Probe server exited before readiness' }
try { $ready=Invoke-WebRequest "$base/health/ready" -TimeoutSec 1; if ($ready.StatusCode -eq 200) { return } } catch {}