Last active
August 29, 2015 14:11
-
-
Save raine/109647975af87ce21f44 to your computer and use it in GitHub Desktop.
.git/hooks/pre-push
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
#!/bin/bash | |
set -e | |
gulp jshint --target=production | |
dir='./app' | |
bad_words='ddescribe|iit' | |
test_file_pattern='*test.js' | |
test_files=`find $dir -name $test_file_pattern` | |
bad_words_line_count=`echo $test_files | xargs grep -E $bad_words | wc -l` | |
if [ $bad_words_line_count -gt 0 ]; then | |
ag $bad_words $dir | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment