Skip to content

Instantly share code, notes, and snippets.

@absk1317
Last active November 14, 2018 10:32
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 absk1317/a91883e9e76b590192baaee72125234d to your computer and use it in GitHub Desktop.
Save absk1317/a91883e9e76b590192baaee72125234d to your computer and use it in GitHub Desktop.
Add pronto in git push
#!/bin/sh
# To reinstall this script in the same or another git repo run:
# curl -sSL https://gist.githubusercontent.com/absk1317/a91883e9e76b590192baaee72125234d/raw/360f85bbc0504bbf07c748d06fcbc1a12f5b4967/pre-push-pronto > .git/hooks/pre-push; chmod +x .git/hooks/pre-push
# check that pronto is installed
hash pronto 2>/dev/null || {
echo >&2 "Pronto is not installed. Install with 'gem install pronto pronto-rubocop'";
echo >&2 "Find other Pronto runners at https://github.com/mmozuras/pronto#runners";
exit 0;
}
# Run pronto
pronto run -c origin/master --exit-code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment