feat: make installs quieter
This removes output from commands that otherwise should be silent - such as when not needing to migrate data.
This commit is contained in:
@@ -12,15 +12,14 @@ migrate_checks_vars_0_5_0() {
|
||||
|
||||
local app
|
||||
|
||||
dokku_log_info1 "Migrating zero downtime env variables to 0.5.x. The following variables have been deprecated"
|
||||
dokku_log_info2 "DOKKU_SKIP_ALL_CHECKS DOKKU_SKIP_DEFAULT_CHECKS"
|
||||
dokku_log_info2 "Please use dokku checks:[disable|enable] <app> to control zero downtime functionality"
|
||||
|
||||
for app in $APPS; do
|
||||
local APP_SKIP_ALL_CHECKS=$(config_get "$app" DOKKU_SKIP_ALL_CHECKS || true)
|
||||
local APP_SKIP_DEFAULT_CHECKS=$(config_get "$app" DOKKU_SKIP_DEFAULT_CHECKS || true)
|
||||
|
||||
if [[ "$APP_SKIP_ALL_CHECKS" == "true" ]] || [[ "$APP_SKIP_DEFAULT_CHECKS" == "true" ]] || [[ "$GLOBAL_SKIP_ALL_CHECKS" == "true" ]] || [[ "$GLOBAL_SKIP_DEFAULT_CHECKS" == "true" ]]; then
|
||||
dokku_log_info1 "Migrating zero downtime env variables to 0.5.x. The following variables have been deprecated"
|
||||
dokku_log_info2 "DOKKU_SKIP_ALL_CHECKS DOKKU_SKIP_DEFAULT_CHECKS"
|
||||
dokku_log_info2 "Please use dokku checks:[disable|enable] <app> to control zero downtime functionality"
|
||||
dokku_log_info2 ""
|
||||
dokku_log_info2 "zero downtime checks disabled for app ($app)"
|
||||
config_set --no-restart "$app" DOKKU_CHECKS_ENABLED=0
|
||||
@@ -34,23 +33,19 @@ migrate_checks_vars_0_5_0() {
|
||||
dokku_log_info1 "Removing global zero downtime settings"
|
||||
config_unset --global DOKKU_SKIP_ALL_CHECKS DOKKU_SKIP_DEFAULT_CHECKS
|
||||
fi
|
||||
dokku_log_info2 "Migration complete"
|
||||
dokku_log_info2 ""
|
||||
}
|
||||
|
||||
migrate_checks_vars_0_5_0 "$@"
|
||||
|
||||
migrate_checks_vars_0_6_0() {
|
||||
declare desc="migrates CHECKS config variables from 0.5.x to support fully-disabled zero-downtime checks"
|
||||
local APPS="$(dokku_apps)"
|
||||
|
||||
local app
|
||||
|
||||
dokku_log_info1 "Migrating zero downtime env variables to 0.6.x. The following variables will be migrated"
|
||||
dokku_log_info2 "DOKKU_CHECKS_ENABLED -> DOKKU_CHECKS_SKIPPED"
|
||||
for app in $APPS; do
|
||||
local APP_DOKKU_CHECKS_ENABLED=$(config_get "$app" DOKKU_CHECKS_ENABLED || true)
|
||||
if [[ $APP_DOKKU_CHECKS_ENABLED ]]; then
|
||||
dokku_log_info1 "Migrating zero downtime env variables to 0.6.x. The following variables will be migrated"
|
||||
dokku_log_info2 "DOKKU_CHECKS_ENABLED -> DOKKU_CHECKS_SKIPPED"
|
||||
if [[ "$APP_DOKKU_CHECKS_ENABLED" == "0" ]]; then
|
||||
dokku_log_info2 ""
|
||||
dokku_log_info2 "zero downtime checks disabled for app ($app)"
|
||||
@@ -59,8 +54,7 @@ migrate_checks_vars_0_6_0() {
|
||||
config_unset --no-restart "$app" DOKKU_CHECKS_ENABLED || true
|
||||
fi
|
||||
done
|
||||
dokku_log_info2 "Migration complete"
|
||||
dokku_log_info2 ""
|
||||
}
|
||||
|
||||
migrate_checks_vars_0_5_0 "$@"
|
||||
migrate_checks_vars_0_6_0 "$@"
|
||||
|
||||
Reference in New Issue
Block a user