[#2] Fixed commit hook
This commit is contained in:
parent
e2493e7b19
commit
0007652e68
2 changed files with 8 additions and 7 deletions
|
|
@ -5,10 +5,10 @@
|
|||
|
||||
branch=`git rev-parse --abbrev-ref HEAD`
|
||||
|
||||
# Just lint the code before committing
|
||||
make lint
|
||||
|
||||
# TODO should we add release branches here as well?
|
||||
if [[ "$branch" =~ ^master|develop$ ]]; then
|
||||
make test
|
||||
make test > /dev/null 2>&1 || {
|
||||
>&2 echo "Tests failed. check 'make test' for more info.";
|
||||
exit 1;
|
||||
}
|
||||
fi
|
||||
|
|
|
|||
Reference in a new issue