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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user