24 lines
293 B
Bash
24 lines
293 B
Bash
|
#!/usr/bin/env bash
|
||
|
|
||
|
cdroot() {
|
||
|
cd "${0%/*}/.."
|
||
|
}
|
||
|
|
||
|
|
||
|
echo "Running pre-commit hook"
|
||
|
./scripts/run-tests.sh
|
||
|
|
||
|
if [ $? -ne 0 ]; then
|
||
|
echo "Tests must pass before commit!"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
./scripts/build-docs.sh
|
||
|
|
||
|
if [ $? -ne 0 ]; then
|
||
|
echo "Doc must pass before commit!"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
|
echo "Done."
|