- Add pre-commit and pre-push hooks for build file protection - Create comprehensive guard script for BUILDING.md validation - Add npm scripts for guard setup and testing - Integrate with existing build system
16 lines
380 B
Bash
Executable File
16 lines
380 B
Bash
Executable File
#!/usr/bin/env bash
|
|
#
|
|
# Husky Pre-commit Hook
|
|
# Runs Build Architecture Guard to check staged files
|
|
#
|
|
. "$(dirname -- "$0")/_/husky.sh"
|
|
|
|
echo "🔍 Running Build Architecture Guard (pre-commit)..."
|
|
bash ./scripts/build-arch-guard.sh --staged || {
|
|
echo
|
|
echo "💡 To bypass this check for emergency commits, use:"
|
|
echo " git commit --no-verify"
|
|
echo
|
|
exit 1
|
|
}
|