add git pre-commit hooks
This commit is contained in:
parent
585f04c745
commit
cd43b3b853
2 changed files with 19 additions and 0 deletions
11
.githooks/pre-commit
Executable file
11
.githooks/pre-commit
Executable file
|
|
@ -0,0 +1,11 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "Running tests before commit..."
|
||||
|
||||
# run tests
|
||||
make test || {
|
||||
echo "Tests failed. Commit aborted."
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo "Tests passed. Proceeding with commit."
|
||||
Loading…
Add table
Add a link
Reference in a new issue