Skip to content

Instantly share code, notes, and snippets.

@sanity
Created March 11, 2009 21:38
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 sanity/77763 to your computer and use it in GitHub Desktop.
Save sanity/77763 to your computer and use it in GitHub Desktop.
Vegas-2:SenseArray(doubleding) ian$ cat .git/hooks/pre-commit
#!/bin/bash
# Note that the last command in the script must exit with non-zero return
# value for the commit to be aborted
echo -n "Running unit tests: "
mvn test > /tmp/sa.tests.log && echo "Done." || (cat /tmp/sa.tests.log; say "Unit tests failed, commit aborted"; exit 1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment