95c6ceb072
apple / swift (push) Successful in 54s
ci / rust (push) Failing after 30s
ci / web (push) Successful in 37s
ci / docs-site (push) Successful in 57s
android / android (push) Successful in 3m24s
deb / build-publish (push) Successful in 2m19s
decky / build-publish (push) Successful in 12s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 4s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 4s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 3s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 4s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 3s
ci / bench (push) Successful in 4m39s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 8m24s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 8m19s
docker / deploy-docs (push) Successful in 6s
scripts/windows/: setup-build-env.ps1 persists the NVENC build env (Machine scope: PUNKTFUNK_NVENC_LIB_DIR, LIBCLANG_PATH, CMAKE_POLICY_VERSION_MINIMUM -- no FFMPEG_DIR, the nvenc build doesn't link libavcodec). deploy-host.ps1 rebuilds --release --features nvenc and restarts the PunktfunkHost service with .bak rollback on build/start failure. build-web.ps1 rebuilds the Nitro web console (bun build, node runtime) and restarts the PunktfunkWeb task. README documents the flow -- a redeploy is now a single script call. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
42 lines
1.7 KiB
PowerShell
42 lines
1.7 KiB
PowerShell
<#
|
|
Rebuild the web mgmt console from the CURRENT web/ source and restart the PunktfunkWeb task.
|
|
|
|
powershell -ExecutionPolicy Bypass -File scripts\windows\build-web.ps1
|
|
|
|
bun = build tool, node = runtime (the Nitro bundle externalizes srvx/@unom for SSR, which
|
|
bun fails to resolve at runtime). The PunktfunkWeb scheduled task runs web\web-run.cmd ->
|
|
node .output\server\index.mjs on :3000.
|
|
#>
|
|
$ErrorActionPreference = 'Stop'
|
|
$repo = Split-Path (Split-Path $PSScriptRoot)
|
|
$web = Join-Path $repo 'web'
|
|
$bun = 'C:\Users\Public\bun\bin\bun.exe'
|
|
$task = 'PunktfunkWeb'
|
|
if (-not (Test-Path $bun)) { throw "bun not found at $bun" }
|
|
|
|
Set-Location $web
|
|
Write-Host "bun install + build ..."
|
|
& $bun install
|
|
& $bun run build
|
|
if ($LASTEXITCODE -ne 0) { throw "web build failed (exit $LASTEXITCODE)" }
|
|
|
|
# The Nitro server bundle externalizes its runtime deps - install them in .output/server,
|
|
# with the @unom registry .npmrc present (else @unom/* 404s on npmjs).
|
|
Write-Host "installing externalized server deps ..."
|
|
Copy-Item "$web\.npmrc" "$web\.output\server\.npmrc" -Force
|
|
Set-Location "$web\.output\server"
|
|
& $bun install
|
|
|
|
Write-Host "restarting $task ..."
|
|
& schtasks /end /tn $task 2>$null | Out-Null
|
|
Get-CimInstance Win32_Process -Filter "Name='node.exe'" -ErrorAction SilentlyContinue |
|
|
Where-Object { $_.CommandLine -match 'index\.mjs' } |
|
|
ForEach-Object { Stop-Process -Id $_.ProcessId -Force -ErrorAction SilentlyContinue }
|
|
Start-Sleep 2
|
|
& schtasks /run /tn $task | Out-Null
|
|
Start-Sleep 5
|
|
try {
|
|
$r = Invoke-WebRequest 'http://127.0.0.1:3000/login' -UseBasicParsing -TimeoutSec 10
|
|
Write-Host "DONE - web /login -> HTTP $($r.StatusCode)"
|
|
} catch { Write-Warning "web restarted but /login check failed: $($_.Exception.Message)" }
|