the-custodian/scripts/generated-pre-commit.sh

7 lines
287 B
Bash
Raw Permalink Normal View History

#!/bin/sh
# Install as .git/hooks/pre-commit; rejects generated/evidence-only auto commits too.
set -eu
REPO_ROOT="$(git rev-parse --show-toplevel)"
python3 "$REPO_ROOT/scripts/check_generated_only_commit.py" --staged
exec python3 "$REPO_ROOT/scripts/run_generated_work_records_hook.py"