Created
January 28, 2011 01:53
-
-
Save jbrown/799675 to your computer and use it in GitHub Desktop.
.git/hooks/pre-commit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ruby | |
# Check Ruby syntax and run the test suites | |
exit 1 unless | |
system('git diff --cached --name-only | grep "\(Rakefile\|\.rb$\)" | xargs ruby -c') && | |
system('rake ci') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment