map-machine/data/githooks/pre-push
2021-09-10 01:10:17 +03:00

19 lines
317 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"
exit 1
fi
data/githooks/pre-commit || { echo "FAIL"; exit 1; }
# Unit tests with pytest.
echo "Run tests with pytest..."
pytest -v || { echo "FAIL"; exit 1; }
exit 0