Files
firefrost-services/scripts/pre-commit-hook.sh
Claude (Chronicler #83 - The Compiler) 28608e9fa8 Build pipeline hardening: ErrorBoundary, no PHP copies, TS pre-flight
- ErrorBoundary.tsx wraps widget — crashes show fallback, not blank void
- build.sh v1.1.0: removed ALL PHP file copies (Chronicler deploys manually)
- Added set -e / set -u for fail-fast
- Added TypeScript pre-flight check (yarn tsc --noEmit) before build
- Added dynamic Blueprint controller detection via find
- Widget injection now wrapped in <ModpackErrorBoundary>
- Pre-commit PHP lint hook at scripts/pre-commit-hook.sh

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 00:17:30 -05:00

10 lines
339 B
Bash

#!/bin/bash
# Pre-commit hook: PHP syntax check
# Install: cp scripts/pre-commit-hook.sh .git/hooks/pre-commit && chmod +x .git/hooks/pre-commit
FILES=$(git diff --cached --name-only --diff-filter=ACMR | grep ".php$")
for FILE in $FILES; do
php -l "$FILE" || { echo "Aborting commit: PHP syntax error in $FILE"; exit 1; }
done
exit 0