You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

pre-commit.sh 301B

123456789101112131415161718
  1. #!/usr/bin/env bash
  2. git stash --keep-index -q
  3. source ~/.virtualenvs/oscar/bin/activate
  4. ./run_tests.py
  5. TEST_RESULT=$?
  6. jshint oscar/static/js/oscar
  7. JS_RESULT=$?
  8. git stash pop -q
  9. [ $TEST_RESULT -ne 0 ] && echo "Tests failed" && exit 1
  10. [ $JS_RESULT -ne 0 ] && echo "JShint failed" && exit 1
  11. exit 0