openvibers/openvibe.tools Commits
Tools deploy checks every app resolves each dependency before restarting; an emptied file: link reinstalls instead of crash-looping all units
Changes
@@@ -6,7 +6,20 @@ cd "$(dirname "$0")/../.."BEFORE=$(git rev-parse HEAD); git pull -q --ff-only; AFTER=$(git rev-parse HEAD)for app in apps/*/; do[ -f "$app/package.json" ] || continue-- if git diff --name-only "$BEFORE" "$AFTER" -- "$app/package.json" | grep -q . || [ ! -d "$app/node_modules" ]; then (cd "$app" && npm install --omit=dev --no-audit --no-fund --silent); fi++ if git diff --name-only "$BEFORE" "$AFTER" -- "$app/package.json" | grep -q . || [ ! -d "$app/node_modules" ]; then (cd "$app" && npm install --omit=dev --no-audit --no-fund --loglevel=error); fi++done++# Every app must resolve its dependencies before anything restarts. A dependency that used to be a++# file: link can leave an empty directory npm treats as installed (2026-09-23: vendor/openvibe-shared++# kept an untracked lockfile, every unit crash-looped on 'openvibe-shared/brand'); reinstall those.++for app in apps/*/; do++ [ -f "$app/package.json" ] || continue++ for dep in $(node -e 'console.log(Object.keys(require("./"+process.argv[1]+"package.json").dependencies||{}).join(" "))' "$app"); do++ if [ ! -f "$app/node_modules/$dep/package.json" ]; then++ echo "reinstalling $dep in $app (missing package.json)"; rm -rf "$app/node_modules/$dep"++ (cd "$app" && npm install --omit=dev --no-audit --no-fund --loglevel=error)++ [ -f "$app/node_modules/$dep/package.json" ] || { echo "ABORT: $app cannot resolve $dep; nothing restarted" >&2; exit 1; }++ fi++ donedoneUNITS=$(systemctl list-unit-files 'openvibe-tools*' --no-legend | awk '{print $1}')sudo systemctl restart $UNITS
@@ -6,7 +6,20 @@ cd "$(dirname "$0")/../.."
@@ -6,7 +6,20 @@ cd "$(dirname "$0")/../.."
BEFORE=$(git rev-parse HEAD); git pull -q --ff-only; AFTER=$(git rev-parse HEAD)
BEFORE=$(git rev-parse HEAD); git pull -q --ff-only; AFTER=$(git rev-parse HEAD)
for app in apps/*/; do
for app in apps/*/; do
[ -f "$app/package.json" ] || continue
[ -f "$app/package.json" ] || continue
- if git diff --name-only "$BEFORE" "$AFTER" -- "$app/package.json" | grep -q . || [ ! -d "$app/node_modules" ]; then (cd "$app" && npm install --omit=dev --no-audit --no-fund --silent); fi
+ if git diff --name-only "$BEFORE" "$AFTER" -- "$app/package.json" | grep -q . || [ ! -d "$app/node_modules" ]; then (cd "$app" && npm install --omit=dev --no-audit --no-fund --loglevel=error); fi
+done
+# Every app must resolve its dependencies before anything restarts. A dependency that used to be a
+# file: link can leave an empty directory npm treats as installed (2026-09-23: vendor/openvibe-shared
+# kept an untracked lockfile, every unit crash-looped on 'openvibe-shared/brand'); reinstall those.
+for app in apps/*/; do
+ [ -f "$app/package.json" ] || continue
+ for dep in $(node -e 'console.log(Object.keys(require("./"+process.argv[1]+"package.json").dependencies||{}).join(" "))' "$app"); do
+ if [ ! -f "$app/node_modules/$dep/package.json" ]; then
+ echo "reinstalling $dep in $app (missing package.json)"; rm -rf "$app/node_modules/$dep"
+ (cd "$app" && npm install --omit=dev --no-audit --no-fund --loglevel=error)
+ [ -f "$app/node_modules/$dep/package.json" ] || { echo "ABORT: $app cannot resolve $dep; nothing restarted" >&2; exit 1; }
+ fi
+ done
done
done
UNITS=$(systemctl list-unit-files 'openvibe-tools*' --no-legend | awk '{print $1}')
UNITS=$(systemctl list-unit-files 'openvibe-tools*' --no-legend | awk '{print $1}')
sudo systemctl restart $UNITS
sudo systemctl restart $UNITS