fix: correct frontend deps check in build script
Use 'package-lock.json -nt node_modules/.package-lock.json' to detect when lockfile changed (e.g. after git pull). Use 'npm ci' for deterministic install instead of 'npm install'.
This commit is contained in:
parent
767bf5c140
commit
39d3b82199
|
|
@ -15,9 +15,9 @@ build_gui() {
|
||||||
|
|
||||||
# Ensure frontend dependencies are installed
|
# Ensure frontend dependencies are installed
|
||||||
cd frontend
|
cd frontend
|
||||||
if [ ! -d "node_modules" ] || [ ! -f "node_modules/.package-lock.json" ]; then
|
if [ ! -d "node_modules" ] || [ "package-lock.json" -nt "node_modules/.package-lock.json" ]; then
|
||||||
echo "==> Installing frontend dependencies..."
|
echo "==> Installing frontend dependencies..."
|
||||||
npm install
|
npm ci
|
||||||
fi
|
fi
|
||||||
npm run build
|
npm run build
|
||||||
cd ..
|
cd ..
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue