Created
September 20, 2017 08:40
-
-
Save stereosupersonic/451f7dcde53bbd89f44e01f188548edd to your computer and use it in GitHub Desktop.
rubocop git hook 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/sh | |
echo "pre-push" | |
echo "Starting rubocop" | |
bundle exec rubocop | |
if [ $? -ne 0 ]; then | |
echo "" | |
echo "" | |
echo "Rubocop failed; push aborted!" | |
exit 1 | |
fi | |
echo | |
echo "All pre-push checks passed! Pushing to remote" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment