From d9a8efbcc08ec0eb83463512dc644a0845439da8 Mon Sep 17 00:00:00 2001 From: Stephan Seitz <stephan.seitz@fau.de> Date: Sun, 18 Aug 2019 15:02:25 +0200 Subject: [PATCH] Add pre-push --- pre-push | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 pre-push diff --git a/pre-push b/pre-push new file mode 100755 index 0000000..d46b0ee --- /dev/null +++ b/pre-push @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +# Checks run before every push +# has to be copied to .git/hooks + +echo "Running pre-push hook" +echo "Running flak8 check" +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 -- GitLab