Skip to content

Instantly share code, notes, and snippets.

@ktravis
Created August 27, 2015 15:33
Show Gist options
  • Select an option

  • Save ktravis/e037d2215130923134b0 to your computer and use it in GitHub Desktop.

Select an option

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