fix(scripts): update justfile and verify_deployment script to check /health version

This commit is contained in:
Riz Ashraf committed 2026-10-05 09:59:30 +01:00
1 parent cb39f94584
commit 9f10984c18
2 files changed
+8 -6

No files matched your search

+7 -5
View File
@@ -5,13 +5,15 @@ $HealthUrl = "http://127.0.0.1:$Port/ping"
$UiUrl = "http://127.0.0.1:$Port/?t=$(Get-Random)"
$ExpectedContent = "open-color" # Basic sanity check that we are serving the updated UI
Write-Host "Verifying server HEALTH at $HealthUrl..." -ForegroundColor Cyan
Write-Host "Verifying server HEALTH at http://127.0.0.1:$Port/health..." -ForegroundColor Cyan
for ($i = 1; $i -le 40; $i++) {
try {
$healthResponse = Invoke-WebRequest -Uri $HealthUrl -UseBasicParsing -ErrorAction Stop
if ($healthResponse.StatusCode -eq 200) {
Write-Host "✅ Server /ping is UP! (Attempt $i)" -ForegroundColor Green
$healthResponse = Invoke-RestMethod -Uri "http://127.0.0.1:$Port/health" -UseBasicParsing -ErrorAction Stop
if ($healthResponse.status -eq "ok") {
$ver = $healthResponse.version
Write-Host "✅ Server /health is UP! Status: $($healthResponse.status.ToUpper()) (Attempt $i)" -ForegroundColor Green
Write-Host " Running Build Version: $($ver.app_version) [$($ver.target_os)/$($ver.target_arch)]" -ForegroundColor Green
Write-Host "Verifying UI payload at $UiUrl..." -ForegroundColor Cyan
$uiResponse = Invoke-WebRequest -Uri $UiUrl -UseBasicParsing -ErrorAction Stop
@@ -23,7 +25,7 @@ for ($i = 1; $i -le 40; $i++) {
}
}
} catch {
Write-Host "⏳ Server /ping not responding yet... (Attempt $i)" -ForegroundColor Yellow
Write-Host "⏳ Server /health not responding yet... (Attempt $i)" -ForegroundColor Yellow
}
Start-Sleep -Seconds 1
}