bot-base/scripts/pre-commit.sh

24 lines
293 B
Bash
Raw Permalink Normal View History

#!/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."