Skip to content

Instantly share code, notes, and snippets.

@ktravis
Created August 27, 2015 15:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ktravis/e037d2215130923134b0 to your computer and use it in GitHub Desktop.
Save ktravis/e037d2215130923134b0 to your computer and use it in GitHub Desktop.
git hook to run tests pre-commit
#!/bin/bash
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
RET=0
if [ "$CURRENT_BRANCH" != "gh-pages" ]; then
make test
RET=$?
fi
exit $RET
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment