Created
July 26, 2018 14:51
-
-
Save rafaelhenrique/db07ed64fff63ccb2d4bc126deda0141 to your computer and use it in GitHub Desktop.
Find configuration on Heroku
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
Example...
Locate "Hello" configuration from apps: