pre-push 414 Bytes
Newer Older
Stephan Seitz's avatar
Stephan Seitz committed
1
2
3
4
5
6
#!/usr/bin/env bash

# Checks run before every push
# has to be copied to .git/hooks

echo "Running pre-push hook"
Stephan Seitz's avatar
Stephan Seitz committed
7
echo "Running flake8 check"
Stephan Seitz's avatar
Stephan Seitz committed
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
flake8 --append-config=.flake8 pystencils

# $? stores exit value of the last command
if [ $? -ne 0 ]; then
 echo "flake8 failed"
 exit 1
fi

python3 setup.py quicktest

# $? stores exit value of the last command
if [ $? -ne 0 ]; then
 echo "quicktest failed"
 exit 1
fi