Files
Mana-Loop/.husky/pre-commit
T
Refactoring Agent 454195cdfb
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 3m16s
Update hooks and ignore markdown files in size check
2026-04-29 12:18:08 +02:00

27 lines
619 B
Bash
Executable File

#!/bin/sh
echo "🔍 Running pre-commit checks..."
# Get staged files (added, copied, modified)
STAGED_FILES=$(git diff --cached --name-only --diff-filter=ACM)
if [ -n "$STAGED_FILES" ]; then
echo "📏 Checking file sizes..."
node .husky/scripts/check-file-size.js $STAGED_FILES
if [ $? -ne 0 ]; then
exit 1
fi
fi
# Generate project structure
echo "🗺️ Updating project structure..."
node .husky/scripts/generate-project-tree.js
if [ $? -ne 0 ]; then
exit 1
fi
# Auto-add the generated project structure to the commit
git add docs/project-structure.txt
echo "✅ All pre-commit checks passed!"