Created
August 9, 2012 19:22
-
-
Save jodell/3307312 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# sanity heroku_env | |
# | |
# FIXME: Need a better way to 'prime' the app before doing a sanity check. | |
# When done, 503 should be removed from the set of valid http codes. | |
# | |
sanity() { | |
echo "Checking http://$1.herokuapp.com" | |
curl -s -S -L http://$1.herokuapp.com -o /dev/null -m 500 --retry 5 --retry-delay 8 -w '%{http_code}' \ | |
| tee -a /tmp/heroku.out | grep -q '200\|401\|400\|503' || (echo "$1 deploy may have failed!" && exit 1) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment