Created
August 28, 2018 19:15
-
-
Save iamnader/ecf1f28f8f7b995e234f87e1533805fc to your computer and use it in GitHub Desktop.
Script to find unused env vars
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
app=my-app | |
for var in `heroku config -a $app --json | jq '. | keys | .[]' -r` | |
do | |
if ! ag $var `bundle show --paths` . --count --silent --nofilename >/dev/null; | |
then echo $var; | |
fi; | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment