Created
June 26, 2020 13:37
-
-
Save rafaelhenrique/b27e24b59469b0a92f82c8dcca10058e to your computer and use it in GitHub Desktop.
Find heroku envvar value
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 | |
# Config to find on heroku | |
CONFIG=$(echo $CONFIG) | |
if [ -z $CONFIG ]; then | |
echo "Syntax error! CONFIG=<config to find> $0" | |
exit 1 | |
fi | |
ALL_APPS=( $(heroku apps -A| awk '($1 !~ "==") {print $1}') ) | |
for((cont=0; cont<${#ALL_APPS[@]}; cont++)); do | |
APP=${ALL_APPS[$cont]} | |
heroku config -a $APP | grep $CONFIG | |
if [ $? -eq 0 ]; then | |
echo "Config is here! $APP" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment