Update hooks and ignore markdown files in size check
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 3m16s
Build and Publish Mana Loop Docker Image / build-and-publish (push) Successful in 3m16s
This commit is contained in:
Executable
+26
@@ -0,0 +1,26 @@
|
||||
#!/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!"
|
||||
Reference in New Issue
Block a user