Use dokku config to check if an env has output

This commit is contained in:
Jose Diaz-Gonzalez
2015-08-20 23:27:30 -04:00
parent cc66905c6e
commit 66ad7d0985

View File

@@ -9,12 +9,12 @@ APP="$1"; IMAGE="dokku/$APP"; BUILD_ENV=""
dokku config:get --global CURL_CONNECT_TIMEOUT > /dev/null 2>&1 || dokku config:set --global CURL_CONNECT_TIMEOUT=5
dokku config:get --global CURL_TIMEOUT > /dev/null 2>&1 || dokku config:set --global CURL_TIMEOUT=30
if [[ -f "$DOKKU_ROOT/ENV" ]]; then
if [[ -n $(dokku config --global --export) ]]; then
BUILD_ENV+=$'\n'
BUILD_ENV+=$(< "$DOKKU_ROOT/ENV")
BUILD_ENV+=$'\n'
fi
if [[ -f "$DOKKU_ROOT/$APP/ENV" ]]; then
if [[ -n $(dokku config $APP --export) ]]; then
BUILD_ENV+=$'\n'
BUILD_ENV+=$(< "$DOKKU_ROOT/$APP/ENV")
BUILD_ENV+=$'\n'