ci(post-commit): updated to track post-commit

This commit is contained in:
2025-03-17 13:31:54 -04:00
parent 4d12b6beb2
commit 7568eb1a46
3 changed files with 64 additions and 3 deletions

19
commit-config/hooks/install.sh Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
PROJECT_ROOT=$_4DSSE_ROOT
# Check if the project root is set
if [ -z "$PROJECT_ROOT" ]; then
echo "The 4DSSE root is not set. Please set the _4DSSE_ROOT environment variable."
exit 1
fi
cp $PROJECT_ROOT/commit-config/hooks/post-commit $PROJECT_ROOT/.git/hooks/post-commit
# Make sure the post-commit hook is executable
chmod +x $PROJECT_ROOT/.git/hooks/post-commit
# Check if the post-commit hook was copied successfully
if [ ! -f $PROJECT_ROOT/.git/hooks/post-commit ]; then
echo "ERROR! The post-commit hook was not copied successfully."
exit 1
fi