pvc/.hooks/pre-commit

16 lines
223 B
Plaintext
Raw Normal View History

2020-11-07 15:32:56 -05:00
#!/usr/bin/env bash
pushd $( git rev-parse --show-toplevel ) &>/dev/null
ex=0
./prepare
2020-11-07 15:32:56 -05:00
if [[ $? -ne 0 ]]; then
echo "Aborting commit due to formatting or linting errors."
2020-11-07 15:32:56 -05:00
ex=1
fi
echo
popd &>/dev/null
exit $ex