Add pre-commit hook that runs check-provenance.sh before each commit to ensure fixture files always have valid provenance entries. Update PROVENANCE.md with validation section documenting the hook usage. Acceptance criteria: - PROVENANCE.md exists with one row per fixture file ✓ - Every fixture file enumerated; no orphans ✓ - License column populated; only approved licenses ✓ - SHA256 column populated; matches actual content ✓ - check-provenance.sh validates manifest; CI gate green ✓ - Synthetic fixtures point at generation scripts ✓ Refs: pdftract-5z5d8 Co-Authored-By: Claude Code <noreply@anthropic.com>
14 lines
392 B
Bash
Executable file
14 lines
392 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# Pre-commit hook: Validate fixture provenance before allowing commits.
|
|
# This ensures every fixture file has a corresponding PROVENANCE.md entry.
|
|
#
|
|
# To install this hook:
|
|
# ln -s ../../.git-hooks/pre-commit .git/hooks/pre-commit
|
|
# Or run: make install-hooks (if Makefile exists)
|
|
|
|
set -e
|
|
|
|
# Run the provenance validation script
|
|
bash scripts/check-provenance.sh
|
|
|
|
exit 0
|