Ampel-Vorlage: klare Lockfile-Pruefung statt kryptischem npm-ci-Fehler

Erster rippy-Lauf bewies: fehlendes package-lock.json = EUSAGE-Wand.
Jetzt: verstaendliche rote Meldung mit Fix-Anleitung.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hitonabi
2026-07-22 19:11:31 +02:00
parent a121ca7dc0
commit af28a75338
+5
View File
@@ -56,6 +56,11 @@ jobs:
[ -n "$pkg" ] || continue
d=$(dirname "$pkg")
echo "-- $d"
if [ ! -f "$d/package-lock.json" ]; then
echo "❌ $d: kein package-lock.json — Build nicht reproduzierbar."
echo " Fix: dort 'npm install --package-lock-only' ausführen und committen."
rot=1; continue
fi
(cd "$d" && npm ci --no-audit --no-fund) || { rot=1; continue; }
if grep -q '"build"' "$pkg"; then (cd "$d" && npm run build) || rot=1; fi
if grep -q '"test"' "$pkg"; then (cd "$d" && npm test --silent) || rot=1; fi