From 5e80932c4a4f595211403554cf12a2487b7c7be7 Mon Sep 17 00:00:00 2001 From: oliver Date: Mon, 12 Oct 2026 15:56:06 +0800 Subject: [PATCH] Fix Windows release web build --- packaging/build_release.ps1 | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/packaging/build_release.ps1 b/packaging/build_release.ps1 index c836d73..0451b2b 100644 --- a/packaging/build_release.ps1 +++ b/packaging/build_release.ps1 @@ -36,13 +36,16 @@ if (-not $SkipWebBuild) { throw "npm_not_found" } Write-Host "==> npm build" - if (-not (Test-Path (Join-Path $webRoot "node_modules"))) { - & npm.cmd install --prefix $webRoot + Push-Location $webRoot + try { + & npm.cmd ci if ($LASTEXITCODE -ne 0) { throw "npm_install_failed" } + # Release packaging skips tsc (dev CI still uses `npm run build`). + & npm.cmd run build:release + if ($LASTEXITCODE -ne 0) { throw "web_build_failed" } + } finally { + Pop-Location } - # Release packaging skips tsc (dev CI still uses `npm run build`). - & npm.cmd run build:release --prefix $webRoot - if ($LASTEXITCODE -ne 0) { throw "web_build_failed" } } if (-not (Test-Path (Join-Path $dist "index.html"))) { throw "web_dist_missing: build web/ or drop -SkipWebBuild"