map-machine/data/githooks/pre-push
2021-11-14 07:50:20 +03:00

20 lines
332 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 -v || { echo "FAIL"; exit 1; }
exit 0