only release and deploy if we're modifying scale settings

This commit is contained in:
Michael Hobbs
2015-04-17 20:40:20 -07:00
parent 5c85e8bf65
commit 389b5efa06
3 changed files with 3 additions and 3 deletions

View File

@@ -141,7 +141,7 @@ copy_from_image() {
CID=$(docker run -d $IMAGE bash)
docker cp "$CID:$SRC_FILE" "$DST_DIR"
docker rm -f "$CID"
docker rm -f "$CID" &> /dev/null
}
is_deployed() {

View File

@@ -117,8 +117,8 @@ case "$1" in
dokku_log_info2 "$(< $DOKKU_SCALE_FILE)"
else
set_scale "$APP" "$@"
release_and_deploy "$APP"
fi
release_and_deploy "$APP"
;;
help | ps:help)

View File

@@ -4,7 +4,7 @@ source "$(dirname $0)/../common/functions"
generate_scale_file() {
local APP="$1"; local DOKKU_SCALE_FILE="$DOKKU_ROOT/$APP/DOKKU_SCALE"
copy_from_image "$APP" "/app/DOKKU_SCALE" "$DOKKU_ROOT/$APP" || dokku_log_info1_quiet "DOKKU_SCALE not found in app image"
copy_from_image "$APP" "/app/DOKKU_SCALE" "$DOKKU_ROOT/$APP" 2>/dev/null || dokku_log_info1_quiet "DOKKU_SCALE not found in app image"
if [[ ! -f $DOKKU_SCALE_FILE ]]; then
local TMP_WORK_DIR=$(mktemp -d DOKKU_SCALE.XXXXX)
trap 'rm -rf $TMP_WORK_DIR' EXIT