map-machine/data/githooks/pre-push
2021-12-11 13:53:00 +03:00

20 lines
333 B
Bash
Executable file

#!/bin/sh
echo "Looking for changes..."
files=`git status --porcelain | wc -l`
if [ ${files} == 0 ] ; then
echo "OK"
else
echo "FAIL"
git status
exit 1
fi
data/githooks/pre-commit || { echo "FAIL"; exit 1; }
# Unit tests with pytest.
echo "Run tests with pytest..."
pytest -vv || { echo "FAIL"; exit 1; }
exit 0