27 lines
746 B
Bash
27 lines
746 B
Bash
#!/usr/bin/env bash
|
|
# _check_library_drop_roster.sh
|
|
#
|
|
# Re-derives the library-drop triage from drops/*/MANIFEST.md and diffs it
|
|
# against the committed library-drop-roster.json. Exits 0 iff the committed
|
|
# roster still matches the source manifests (i.e. the work is correct).
|
|
set -u
|
|
|
|
DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
MANIFESTS_DIR=/root/stackchain-library-updates/drops
|
|
|
|
python3 "$DIR/library_drop_classify.py" > "$DIR/.roster.deriva.json"
|
|
status=$?
|
|
if [ $status -ne 0 ]; then
|
|
rm -f "$DIR/.roster.deriva.json"
|
|
exit $status
|
|
fi
|
|
|
|
if diff -u "$DIR/library-drop-roster.json" "$DIR/.roster.deriva.json" > "$DIR/.roster.diff"; then
|
|
status=0
|
|
else
|
|
status=1
|
|
fi
|
|
|
|
rm -f "$DIR/.roster.deriva.json" "$DIR/.roster.diff"
|
|
exit $status
|