fix: guard assemble step (fail if component missing/empty) so pack never ships incomplete

This commit is contained in:
openhands committed 2026-07-20 19:39:13 +02:00
1 parent f74b610eda
commit 5a7d0ab16c
1 file changed
+10
+10
View File
@@ -215,6 +215,16 @@ jobs:
rm -rf "$WORK/out/cms/.git" "$WORK/out/cms/node_modules" 2>/dev/null || true
cp -r "$WORK/src/catalogus" "$WORK/out/catalogus" 2>/dev/null || true
rm -rf "$WORK/out/catalogus/.git" 2>/dev/null || true
# Diagnostics: show each component size before packing.
for d in cms catalogus nitro render emulator; do
echo "out/$d: $(du -sh "$WORK/out/$d" 2>/dev/null | cut -f1) ($(find "$WORK/out/$d" -type f 2>/dev/null | wc -l) files)"
done
# Hard guard: every component must be present and non-empty.
for d in catalogus nitro render emulator; do
if [ ! -d "$WORK/out/$d" ] || [ -z "$(find "$WORK/out/$d" -type f 2>/dev/null | head -1)" ]; then
echo "ERROR: component '$d' is missing or empty in the pack"; exit 1
fi
done
cp "$WORK/components.txt" "$WORK/out/COMPONENTS.txt"
echo "Built at $(date -u)" > "$WORK/out/BUILD_INFO.txt"
cat "$WORK/components.txt" >> "$WORK/out/BUILD_INFO.txt"