Skip to content

Instantly share code, notes, and snippets.

@atomkirk
Created December 8, 2014 15:36
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 atomkirk/891dfc23dee4e751a804 to your computer and use it in GitHub Desktop.
Save atomkirk/891dfc23dee4e751a804 to your computer and use it in GitHub Desktop.
Pre-commit to audit source for personal code/log statements.
echo "Checking host URL…"
e=$(egrep -r '^\s+?host:.*?localhost:3000.*?$' . 2>/dev/null)
if [ -n "$e" ]; then
echo "You need to change host to heroku."
exit 1
fi
@atomkirk
Copy link
Author

atomkirk commented Dec 8, 2014

This could go in .git/hooks/pre-commit to make sure there are no NSLogs etc.

In this case, I point to my local rails server, while my coworker works off of Heroku. After forgetting I have our ember.js app pointing at my localhost and committing/pushing, I created this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment