Created
June 6, 2015 01:37
-
-
Save dcadenas/6a762638c9c3b18e58d0 to your computer and use it in GitHub Desktop.
Shows ENV vars in the Rails app that can't be found in the heroku config
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 | |
echo "These ENV variables only exist in the rails app but not in the heroku config" | |
echo | |
envs_in_rails() { | |
git grep "ENV\[" | sed "s/.*ENV\[['\"]\(.*\)['\"]\].*/\1/" | sort | uniq | |
} | |
envs_in_heroku() { | |
heroku config | sed "s/^\([A-Z][^:]*\):.*/\1/" | sort | uniq | |
} | |
comm -23 <(envs_in_rails) <(envs_in_heroku) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment