use helper functions
This commit is contained in:
@@ -7,7 +7,7 @@ release_and_deploy() {
|
|||||||
source "$(dirname $0)/../common/functions"
|
source "$(dirname $0)/../common/functions"
|
||||||
local APP="$1"; local IMAGE="dokku/$APP"
|
local APP="$1"; local IMAGE="dokku/$APP"
|
||||||
|
|
||||||
if ls $DOKKU_ROOT/$APP/CONTAINER.* &> /dev/null; then
|
if verify_app_image "$APP"; then
|
||||||
if is_image_buildstep_based "$IMAGE"; then
|
if is_image_buildstep_based "$IMAGE"; then
|
||||||
IMAGE_SOURCE_TYPE="buildstep"
|
IMAGE_SOURCE_TYPE="buildstep"
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ generate_scale_file() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
dokku_log_info1_quiet "New DOKKU_SCALE file generated"
|
dokku_log_info1_quiet "New DOKKU_SCALE file generated"
|
||||||
dokku_log_info1_quiet "$(< $DOKKU_SCALE_FILE)"
|
dokku_log_info2_quiet "$(< $DOKKU_SCALE_FILE)"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,6 +42,7 @@ set_scale() {
|
|||||||
for procscale in "${SCALE_SETTINGS[@]}"; do
|
for procscale in "${SCALE_SETTINGS[@]}"; do
|
||||||
PROC_NAME=${procscale%%=*}
|
PROC_NAME=${procscale%%=*}
|
||||||
PROC_COUNT=${procscale#*=}
|
PROC_COUNT=${procscale#*=}
|
||||||
|
is_number $PROC_COUNT || dokku_log_fail "ps:scale $PROC_COUNT is not a number"
|
||||||
dokku_log_info1_quiet "Scaling $APP:$PROC_NAME to $PROC_COUNT"
|
dokku_log_info1_quiet "Scaling $APP:$PROC_NAME to $PROC_COUNT"
|
||||||
if (egrep -q ^${PROC_NAME}= $DOKKU_SCALE_FILE > /dev/null 2>&1);then
|
if (egrep -q ^${PROC_NAME}= $DOKKU_SCALE_FILE > /dev/null 2>&1);then
|
||||||
sed --in-place "s:^${PROC_NAME}=.*:$PROC_NAME=$PROC_COUNT:g" $DOKKU_SCALE_FILE
|
sed --in-place "s:^${PROC_NAME}=.*:$PROC_NAME=$PROC_COUNT:g" $DOKKU_SCALE_FILE
|
||||||
|
|||||||
Reference in New Issue
Block a user