mirror of
https://github.com/BaaRai/ARTEX.git
synced 2026-11-25 17:30:56 +08:00
build: run npm ci with --ignore-scripts in the build/install/update scripts
The Dockerfile already uses `npm ci --ignore-scripts`; the host-side build helpers (build.sh, install.sh, update.sh) did not. Align them so a lifecycle script in a dependency cannot run during a local rebuild. No package in the current lockfile declares install scripts, so this is a hardening no-op today.
This commit is contained in:
@@ -118,7 +118,7 @@ else
|
||||
command -v rsync >/dev/null 2>&1 || die "rsync not detected"
|
||||
info "Building frontend static assets"
|
||||
if [ "${ARTEX_SKIP_NPM_CI:-0}" != "1" ]; then
|
||||
(cd web && npm ci)
|
||||
(cd web && npm ci --ignore-scripts)
|
||||
fi
|
||||
(cd web && npm run build:static)
|
||||
info "Syncing frontend assets to server/webui/dist"
|
||||
|
||||
+1
-1
@@ -106,7 +106,7 @@ JSON
|
||||
# embedding the frontend requires node to produce the static assets
|
||||
if command -v npm >/dev/null 2>&1; then
|
||||
info "building frontend static assets..."
|
||||
( cd web && npm ci && npm run build:static )
|
||||
( cd web && npm ci --ignore-scripts && npm run build:static )
|
||||
rm -rf server/webui/dist && cp -r web/out server/webui/dist
|
||||
info "compiling embedded single binary..."
|
||||
CGO_ENABLED=0 go build -tags embedui -trimpath -o artex ./cmd/artex
|
||||
|
||||
@@ -56,7 +56,7 @@ update_local(){
|
||||
|
||||
if command -v npm >/dev/null 2>&1; then
|
||||
info "Rebuilding frontend static assets…"
|
||||
( cd web && npm ci && npm run build:static )
|
||||
( cd web && npm ci --ignore-scripts && npm run build:static )
|
||||
rm -rf server/webui/dist && cp -r web/out server/webui/dist
|
||||
info "Recompiling the embedded single binary…"
|
||||
CGO_ENABLED=0 go build -tags embedui -trimpath -o artex ./cmd/artex
|
||||
|
||||
Reference in New Issue
Block a user