refactor: standardize command naming
This standardization makes it somewhat easier to read stacktraces as the command names are all uniform, so it will be slightly easier to scan trace output.
This commit is contained in:
@@ -233,7 +233,7 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
hello_main_cmd() {
|
||||
cmd-hello-default() {
|
||||
declare desc="prints Hello \$APP"
|
||||
declare cmd="hello" argv=("$@")
|
||||
[[ ${argv[0]} == "$cmd" ]] && shift 1
|
||||
@@ -250,7 +250,7 @@ hello_main_cmd() {
|
||||
echo "Hello $APP"
|
||||
}
|
||||
|
||||
hello_main_cmd "$@"
|
||||
cmd-hello-default "$@"
|
||||
```
|
||||
|
||||
`hello/subcommands/world`
|
||||
@@ -261,7 +261,7 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
hello_world_cmd() {
|
||||
cmd-hello-world() {
|
||||
declare desc="prints Hello world"
|
||||
declare cmd="hello:world" argv=("$@")
|
||||
[[ ${argv[0]} == "$cmd" ]] && shift 1
|
||||
@@ -269,7 +269,7 @@ hello_world_cmd() {
|
||||
echo "Hello world"
|
||||
}
|
||||
|
||||
hello_world_cmd "$@"
|
||||
cmd-hello-world "$@"
|
||||
```
|
||||
|
||||
`hello/commands`
|
||||
|
||||
@@ -3,7 +3,7 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
dokku_cleanup_cmd() {
|
||||
cmd-cleanup() {
|
||||
declare desc="cleans up old deployment cruft"
|
||||
declare cmd="cleanup"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
@@ -16,4 +16,4 @@ dokku_cleanup_cmd() {
|
||||
docker_cleanup "$APP" "true"
|
||||
}
|
||||
|
||||
dokku_cleanup_cmd "$@"
|
||||
cmd-cleanup "$@"
|
||||
|
||||
@@ -4,4 +4,4 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
shift 1
|
||||
dokku_deploy_cmd "$@"
|
||||
cmd-deploy "$@"
|
||||
|
||||
@@ -3,7 +3,7 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
dokku_report_cmd() {
|
||||
cmd-report() {
|
||||
declare desc="reports dokku vitals for troubleshooting"
|
||||
local cmd="report"
|
||||
declare APP="$2"
|
||||
@@ -31,4 +31,4 @@ dokku_report_cmd() {
|
||||
fi
|
||||
}
|
||||
|
||||
dokku_report_cmd "$@"
|
||||
cmd-report "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
dokku_run_cmd() {
|
||||
cmd-run() {
|
||||
declare desc="runs command in container based on app image"
|
||||
declare cmd="run" APP=""
|
||||
shift
|
||||
@@ -40,4 +40,4 @@ dokku_run_cmd() {
|
||||
plugn trigger scheduler-run "$DOKKU_SCHEDULER" "$APP" "${#RUN_ENV[@]}" "${RUN_ENV[@]}" "$@"
|
||||
}
|
||||
|
||||
dokku_run_cmd "$@"
|
||||
cmd-run "$@"
|
||||
|
||||
@@ -3,11 +3,11 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
dokku_urls_cmd() {
|
||||
cmd-urls() {
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
local APP="$2"
|
||||
|
||||
get_app_urls "$@"
|
||||
}
|
||||
|
||||
dokku_urls_cmd "$@"
|
||||
cmd-urls "$@"
|
||||
|
||||
@@ -3,7 +3,7 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
events_main_cmd() {
|
||||
cmd-events-default() {
|
||||
declare desc="shows contents of dokku events log"
|
||||
local cmd="events"
|
||||
if [[ -f $DOKKU_EVENTS_LOGFILE ]]; then
|
||||
@@ -15,4 +15,4 @@ events_main_cmd() {
|
||||
fi
|
||||
}
|
||||
|
||||
events_main_cmd "$@"
|
||||
cmd-events-default "$@"
|
||||
|
||||
@@ -3,7 +3,7 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
events_list_cmd() {
|
||||
cmd-events-list() {
|
||||
declare desc="lists enabled events"
|
||||
local cmd="events:list"
|
||||
local PLUGIN_DIR="$(dirname "$0")/.."
|
||||
@@ -21,4 +21,4 @@ events_list_cmd() {
|
||||
fi
|
||||
}
|
||||
|
||||
events_list_cmd "$@"
|
||||
cmd-events-list "$@"
|
||||
|
||||
@@ -3,11 +3,11 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
events_off_cmd() {
|
||||
cmd-events-off() {
|
||||
declare desc="disables dokku events logger"
|
||||
local cmd="events:off"
|
||||
echo "Disabling dokku events logger"
|
||||
rm -f "$DOKKU_ROOT/.dokkurc/DOKKU_EVENTS"
|
||||
}
|
||||
|
||||
events_off_cmd "$@"
|
||||
cmd-events-off "$@"
|
||||
|
||||
@@ -3,7 +3,7 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
events_on_cmd() {
|
||||
cmd-events-on() {
|
||||
declare desc="enables dokku events logger"
|
||||
local cmd="events:on"
|
||||
echo "Enabling dokku events logger"
|
||||
@@ -11,4 +11,4 @@ events_on_cmd() {
|
||||
echo "export DOKKU_EVENTS=1" >"$DOKKU_ROOT/.dokkurc/DOKKU_EVENTS"
|
||||
}
|
||||
|
||||
events_on_cmd "$@"
|
||||
cmd-events-on "$@"
|
||||
|
||||
@@ -6,7 +6,7 @@ set -eo pipefail
|
||||
|
||||
case "$1" in
|
||||
help | apps:help)
|
||||
apps_help_cmd "$@"
|
||||
cmd-apps-help "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
|
||||
@@ -95,7 +95,7 @@ apps_help_content_func() {
|
||||
help_content
|
||||
}
|
||||
|
||||
apps_help_cmd() {
|
||||
cmd-apps-help() {
|
||||
if [[ $1 == "apps:help" ]]; then
|
||||
echo -e 'Usage: dokku apps[:COMMAND]'
|
||||
echo ''
|
||||
@@ -119,7 +119,7 @@ help_desc
|
||||
fi
|
||||
}
|
||||
|
||||
apps_list_cmd() {
|
||||
cmd-apps-list() {
|
||||
declare desc="lists all apps"
|
||||
local cmd="apps"
|
||||
local app
|
||||
|
||||
@@ -5,7 +5,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/apps/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
|
||||
|
||||
apps_clone_cmd() {
|
||||
cmd-apps-clone() {
|
||||
declare desc="clones an app"
|
||||
declare cmd="apps:clone" argv=("$@")
|
||||
[[ ${argv[0]} == "$cmd" ]] && shift 1
|
||||
@@ -56,4 +56,4 @@ apps_clone_cmd() {
|
||||
dokku_log_info1_quiet "Cloning $OLD_APP to $NEW_APP... done"
|
||||
}
|
||||
|
||||
apps_clone_cmd "$@"
|
||||
cmd-apps-clone "$@"
|
||||
|
||||
@@ -3,10 +3,10 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_AVAILABLE_PATH/apps/functions"
|
||||
|
||||
apps_create_cmd() {
|
||||
cmd-apps-create() {
|
||||
declare desc="creates app via command line"
|
||||
local cmd="apps:create"
|
||||
apps_create "$2"
|
||||
}
|
||||
|
||||
apps_create_cmd "$@"
|
||||
cmd-apps-create "$@"
|
||||
|
||||
@@ -4,4 +4,4 @@ set -eo pipefail
|
||||
source "$PLUGIN_AVAILABLE_PATH/apps/internal-functions"
|
||||
|
||||
dokku_log_warn "Deprecated: Please use apps:list"
|
||||
apps_list_cmd "$@"
|
||||
cmd-apps-list "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/apps/functions"
|
||||
|
||||
apps_destroy_cmd() {
|
||||
cmd-apps-destroy() {
|
||||
declare desc="destroys an app"
|
||||
local cmd="apps:destroy"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
@@ -14,4 +14,4 @@ apps_destroy_cmd() {
|
||||
apps_destroy "$APP"
|
||||
}
|
||||
|
||||
apps_destroy_cmd "$@"
|
||||
cmd-apps-destroy "$@"
|
||||
|
||||
@@ -3,7 +3,7 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_AVAILABLE_PATH/apps/functions"
|
||||
|
||||
apps_exists_cmd() {
|
||||
cmd-apps-exist() {
|
||||
declare desc="checks if an app exists"
|
||||
local cmd="apps:exists"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
@@ -15,4 +15,4 @@ apps_exists_cmd() {
|
||||
dokku_log_info1 "App exists"
|
||||
}
|
||||
|
||||
apps_exists_cmd "$@"
|
||||
cmd-apps-exist "$@"
|
||||
|
||||
@@ -3,4 +3,4 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_AVAILABLE_PATH/apps/internal-functions"
|
||||
|
||||
apps_list_cmd "$@"
|
||||
cmd-apps-list "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/apps/internal-functions"
|
||||
|
||||
apps_lock_cmd() {
|
||||
cmd-apps-lock() {
|
||||
declare desc="locks an app for deployment"
|
||||
declare cmd="apps:lock"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
@@ -16,4 +16,4 @@ apps_lock_cmd() {
|
||||
dokku_log_info1 "Deploy lock created"
|
||||
}
|
||||
|
||||
apps_lock_cmd "$@"
|
||||
cmd-apps-lock "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/apps/internal-functions"
|
||||
|
||||
apps_locked_cmd() {
|
||||
cmd-apps-locked() {
|
||||
declare desc="checks if an app is locked for deployment"
|
||||
declare cmd="apps:locked"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
@@ -19,4 +19,4 @@ apps_locked_cmd() {
|
||||
dokku_log_quiet "Deploy lock exists"
|
||||
}
|
||||
|
||||
apps_locked_cmd "$@"
|
||||
cmd-apps-locked "$@"
|
||||
|
||||
@@ -5,7 +5,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/apps/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
|
||||
|
||||
apps_rename_cmd() {
|
||||
cmd-apps-rename() {
|
||||
declare desc="renames an app"
|
||||
local cmd="apps:rename"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
@@ -34,4 +34,4 @@ apps_rename_cmd() {
|
||||
echo "Renaming $OLD_APP to $NEW_APP... done"
|
||||
}
|
||||
|
||||
apps_rename_cmd "$@"
|
||||
cmd-apps-rename "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/apps/internal-functions"
|
||||
|
||||
apps_unlock_cmd() {
|
||||
cmd-apps-unlock() {
|
||||
declare desc="unlocks an app for deployment"
|
||||
declare cmd="apps:unlock"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
@@ -21,4 +21,4 @@ apps_unlock_cmd() {
|
||||
dokku_log_info1 "Deploy lock removed"
|
||||
}
|
||||
|
||||
apps_unlock_cmd "$@"
|
||||
cmd-apps-unlock "$@"
|
||||
|
||||
@@ -6,7 +6,7 @@ set -eo pipefail
|
||||
|
||||
case "$1" in
|
||||
help | certs:help)
|
||||
certs_help_cmd "$@"
|
||||
cmd-certs-help "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
|
||||
@@ -87,7 +87,7 @@ certs_help_content_func() {
|
||||
help_content
|
||||
}
|
||||
|
||||
certs_help_cmd() {
|
||||
cmd-certs-help() {
|
||||
if [[ $1 == "certs:help" ]]; then
|
||||
echo -e 'Usage: dokku certs[:COMMAND]'
|
||||
echo ''
|
||||
@@ -104,7 +104,7 @@ help_desc
|
||||
fi
|
||||
}
|
||||
|
||||
certs_info_cmd() {
|
||||
cmd-certs-info() {
|
||||
# This is here because it's used in both the info and the default
|
||||
declare desc="prints SSL certificate info for app"
|
||||
local cmd="certs:info"
|
||||
|
||||
@@ -28,7 +28,7 @@ is_file_import() {
|
||||
return 1
|
||||
}
|
||||
|
||||
certs_set() {
|
||||
cmd-certs-set() {
|
||||
declare desc="imports an SSL cert/key combo either on STDIN via a tarball or from specified cert/key filenames"
|
||||
local cmd="$1"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
@@ -79,4 +79,4 @@ certs_set() {
|
||||
plugn trigger post-domains-update "$APP"
|
||||
}
|
||||
|
||||
certs_set "$@"
|
||||
cmd-certs-set "$@"
|
||||
|
||||
@@ -4,4 +4,4 @@ set -eo pipefail
|
||||
source "$PLUGIN_AVAILABLE_PATH/certs/internal-functions"
|
||||
|
||||
dokku_log_warn "Deprecated: Please use certs:report"
|
||||
certs_info_cmd "$@"
|
||||
cmd-certs-info "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
|
||||
|
||||
certs_generate_cmd() {
|
||||
cmd-certs-generate() {
|
||||
declare desc="generates a self-signed SSL certificate/key combo"
|
||||
declare APP="$2" DOMAIN="$3"
|
||||
local cmd="certs:generate"
|
||||
@@ -37,4 +37,4 @@ certs_generate_cmd() {
|
||||
fi
|
||||
}
|
||||
|
||||
certs_generate_cmd "$@"
|
||||
cmd-certs-generate "$@"
|
||||
|
||||
@@ -4,4 +4,4 @@ set -eo pipefail
|
||||
source "$PLUGIN_AVAILABLE_PATH/certs/internal-functions"
|
||||
|
||||
dokku_log_warn "Deprecated: Please use certs:report"
|
||||
certs_info_cmd "$@"
|
||||
cmd-certs-info "$@"
|
||||
|
||||
@@ -3,7 +3,7 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
certs_remove_cmd() {
|
||||
cmd-certs-remove() {
|
||||
declare desc="removes SSL cert/key from specified app"
|
||||
local cmd="certs:remove"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
@@ -21,4 +21,4 @@ certs_remove_cmd() {
|
||||
fi
|
||||
}
|
||||
|
||||
certs_remove_cmd "$@"
|
||||
cmd-certs-remove "$@"
|
||||
|
||||
@@ -6,7 +6,7 @@ set -eo pipefail
|
||||
|
||||
case "$1" in
|
||||
help | checks:help)
|
||||
checks_help_cmd "$@"
|
||||
cmd-checks-help "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
|
||||
@@ -77,7 +77,7 @@ checks_help_content_func() {
|
||||
help_content
|
||||
}
|
||||
|
||||
checks_help_cmd() {
|
||||
cmd-checks-help() {
|
||||
if [[ $1 == "checks:help" ]]; then
|
||||
echo -e 'Usage: dokku checks[:COMMAND]'
|
||||
echo ''
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/checks/functions"
|
||||
|
||||
checks_main_cmd() {
|
||||
cmd-checks-default() {
|
||||
declare desc="displays app zero-downtime checks status"
|
||||
local cmd="checks"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
@@ -26,4 +26,4 @@ checks_main_cmd() {
|
||||
done
|
||||
}
|
||||
|
||||
checks_main_cmd "$@"
|
||||
cmd-checks-default "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/checks/functions"
|
||||
|
||||
checks_disable_cmd() {
|
||||
cmd-checks-disable() {
|
||||
declare desc="disable zero-downtime checks for app/proctypes"
|
||||
local cmd="checks:disable"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
@@ -43,4 +43,4 @@ checks_disable_cmd() {
|
||||
fi
|
||||
}
|
||||
|
||||
checks_disable_cmd "$@"
|
||||
cmd-checks-disable "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/checks/functions"
|
||||
|
||||
checks_enable_cmd() {
|
||||
cmd-checks-enable() {
|
||||
declare desc="enable zero-downtime checks for app/proctypes"
|
||||
local cmd="checks:enable"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
@@ -42,4 +42,4 @@ checks_enable_cmd() {
|
||||
fi
|
||||
}
|
||||
|
||||
checks_enable_cmd "$@"
|
||||
cmd-checks-enable "$@"
|
||||
|
||||
@@ -67,7 +67,7 @@ check_process() {
|
||||
plugn trigger check-deploy "$APP" "$CONTAINER_ID" "$PROC_TYPE" "$PORT" "$IP"
|
||||
}
|
||||
|
||||
checks_run_cmd() {
|
||||
cmd-checks-run() {
|
||||
declare desc="run zero-downtime checks for app/proctypes"
|
||||
local cmd="checks:run"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
@@ -94,4 +94,4 @@ checks_run_cmd() {
|
||||
fi
|
||||
}
|
||||
|
||||
checks_run_cmd "$@"
|
||||
cmd-checks-run "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/checks/functions"
|
||||
|
||||
checks_skip_cmd() {
|
||||
cmd-checks-skip() {
|
||||
declare desc="skip zero-downtime checks for app/proctypes"
|
||||
local cmd="checks:skip"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
@@ -43,4 +43,4 @@ checks_skip_cmd() {
|
||||
fi
|
||||
}
|
||||
|
||||
checks_skip_cmd "$@"
|
||||
cmd-checks-skip "$@"
|
||||
|
||||
@@ -571,7 +571,7 @@ dokku_release() {
|
||||
plugn trigger builder-release "$IMAGE_SOURCE_TYPE" "$APP" "$IMAGE_TAG"
|
||||
}
|
||||
|
||||
dokku_deploy_cmd() {
|
||||
cmd-deploy() {
|
||||
declare desc="deploy phase"
|
||||
declare APP="$1" IMAGE_TAG="$2"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
@@ -613,7 +613,7 @@ release_and_deploy() {
|
||||
|
||||
if [[ "$DOKKU_SKIP_DEPLOY" != "true" ]]; then
|
||||
dokku_log_info1 "Deploying $APP ($IMAGE)..."
|
||||
dokku_deploy_cmd "$APP" "$IMAGE_TAG"
|
||||
cmd-deploy "$APP" "$IMAGE_TAG"
|
||||
dokku_log_info2 "Application deployed:"
|
||||
get_app_urls urls "$APP" | sed "s/^/ /"
|
||||
else
|
||||
|
||||
@@ -14,7 +14,7 @@ docker_options_help_content_func() {
|
||||
help_content
|
||||
}
|
||||
|
||||
docker_options_help_cmd() {
|
||||
cmd-docker-options-help() {
|
||||
if [[ $1 == "docker-options:help" ]]; then
|
||||
echo -e 'Usage: dokku docker-options[:COMMAND]'
|
||||
echo ''
|
||||
@@ -33,7 +33,7 @@ help_desc
|
||||
|
||||
case "$1" in
|
||||
help | docker-options:help)
|
||||
docker_options_help_cmd "$@"
|
||||
cmd-docker-options-help "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/docker-options/functions"
|
||||
|
||||
docker_options_add_cmd() {
|
||||
cmd-docker-options-add() {
|
||||
declare desc="Add a docker option to application"
|
||||
local cmd="docker-options:add"
|
||||
|
||||
@@ -16,4 +16,4 @@ docker_options_add_cmd() {
|
||||
add_passed_docker_option passed_phases[@] "${passed_docker_option[@]}"
|
||||
}
|
||||
|
||||
docker_options_add_cmd "$@"
|
||||
cmd-docker-options-add "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/docker-options/functions"
|
||||
|
||||
docker_options_main_cmd() {
|
||||
cmd-docker-options-default() {
|
||||
declare desc="Display applications docker options"
|
||||
local cmd="docker-options"
|
||||
dokku_log_warn "Deprecated: Please use docker-options:report"
|
||||
@@ -18,4 +18,4 @@ docker_options_main_cmd() {
|
||||
fi
|
||||
}
|
||||
|
||||
docker_options_main_cmd "$@"
|
||||
cmd-docker-options-default "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/docker-options/functions"
|
||||
|
||||
docker_options_remove_cmd() {
|
||||
cmd-docker-options-remove() {
|
||||
declare desc="Remove a docker option from application"
|
||||
local cmd="docker-options:remove"
|
||||
|
||||
@@ -16,4 +16,4 @@ docker_options_remove_cmd() {
|
||||
remove_passed_docker_option passed_phases[@] "${passed_docker_option[@]}"
|
||||
}
|
||||
|
||||
docker_options_remove_cmd "$@"
|
||||
cmd-docker-options-remove "$@"
|
||||
|
||||
@@ -6,7 +6,7 @@ set -eo pipefail
|
||||
|
||||
case "$1" in
|
||||
help | domains:help)
|
||||
domains_help_cmd "$@"
|
||||
cmd-domains-help "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
|
||||
@@ -102,7 +102,7 @@ domains_help_content_func() {
|
||||
help_content
|
||||
}
|
||||
|
||||
domains_help_cmd() {
|
||||
cmd-domains-help() {
|
||||
if [[ $1 == "domains:help" ]]; then
|
||||
echo -e 'Usage: dokku domains[:COMMAND]'
|
||||
echo ''
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
|
||||
|
||||
domains_add_cmd() {
|
||||
cmd-domains-add() {
|
||||
declare desc="adds domains to app via command line"
|
||||
local cmd="domains:add"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
@@ -14,4 +14,4 @@ domains_add_cmd() {
|
||||
domains_add "$@"
|
||||
}
|
||||
|
||||
domains_add_cmd "$@"
|
||||
cmd-domains-add "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
|
||||
|
||||
domains_add_global_cmd() {
|
||||
cmd-domains-add-global() {
|
||||
declare desc="add global domain names via command line"
|
||||
local cmd="domains:add-global"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify a domain name. Usage: dokku $1 <domain> [<domain> ...]"
|
||||
@@ -13,4 +13,4 @@ domains_add_global_cmd() {
|
||||
domains_add_global "$@"
|
||||
}
|
||||
|
||||
domains_add_global_cmd "$@"
|
||||
cmd-domains-add-global "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
|
||||
|
||||
domains_clear_cmd() {
|
||||
cmd-domains-clear() {
|
||||
declare desc="clear all app domains"
|
||||
local cmd="domains:clear"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
@@ -18,4 +18,4 @@ domains_clear_cmd() {
|
||||
dokku_log_info1 "Cleared domains in $APP"
|
||||
}
|
||||
|
||||
domains_clear_cmd "$@"
|
||||
cmd-domains-clear "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
|
||||
|
||||
domains_clear_global_cmd() {
|
||||
cmd-domains-clear-global() {
|
||||
declare desc="clear global domain names via command line"
|
||||
local cmd="domains:clear-global"
|
||||
shift 1
|
||||
@@ -13,4 +13,4 @@ domains_clear_global_cmd() {
|
||||
domains_clear_global "$@"
|
||||
}
|
||||
|
||||
domains_clear_global_cmd "$@"
|
||||
cmd-domains-clear-global "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
|
||||
|
||||
domains_main_cmd() {
|
||||
cmd-domains-default() {
|
||||
declare desc="print app domains"
|
||||
local cmd="domains"
|
||||
local APP="$2"
|
||||
@@ -30,4 +30,4 @@ domains_main_cmd() {
|
||||
fi
|
||||
}
|
||||
|
||||
domains_main_cmd "$@"
|
||||
cmd-domains-default "$@"
|
||||
|
||||
@@ -4,11 +4,11 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
|
||||
|
||||
domains_disable_cmd() {
|
||||
cmd-domains-disable() {
|
||||
declare desc="disable domains/VHOST support via command line"
|
||||
local cmd="domains:disable"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
domains_disable "$2"
|
||||
}
|
||||
|
||||
domains_disable_cmd "$@"
|
||||
cmd-domains-disable "$@"
|
||||
|
||||
@@ -4,11 +4,11 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
|
||||
|
||||
domains_enable_cmd() {
|
||||
cmd-domains-enable() {
|
||||
declare desc="enable domains/VHOST support via command line"
|
||||
local cmd="domains:enable"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
domains_enable "$2"
|
||||
}
|
||||
|
||||
domains_enable_cmd "$@"
|
||||
cmd-domains-enable "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
|
||||
|
||||
domains_remove_cmd() {
|
||||
cmd-domains-remove() {
|
||||
declare desc="removes domains from app via command line"
|
||||
local cmd="domains:remove"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
@@ -14,4 +14,4 @@ domains_remove_cmd() {
|
||||
domains_remove "$@"
|
||||
}
|
||||
|
||||
domains_remove_cmd "$@"
|
||||
cmd-domains-remove "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
|
||||
|
||||
domains_remove_global_cmd() {
|
||||
cmd-domains-remove-global() {
|
||||
declare desc="remove global domain names via command line"
|
||||
local cmd="domains:remove-global"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify a domain name. Usage: dokku $1 <domain> [<domain> ...]"
|
||||
@@ -13,4 +13,4 @@ domains_remove_global_cmd() {
|
||||
domains_remove_global "$@"
|
||||
}
|
||||
|
||||
domains_remove_global_cmd "$@"
|
||||
cmd-domains-remove-global "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
|
||||
|
||||
domains_set_cmd() {
|
||||
cmd-domains-set() {
|
||||
declare desc="set domains for app via command line"
|
||||
local cmd="domains:set"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
@@ -14,4 +14,4 @@ domains_set_cmd() {
|
||||
domains_set "$@"
|
||||
}
|
||||
|
||||
domains_set_cmd "$@"
|
||||
cmd-domains-set "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
|
||||
|
||||
domains_set_global_cmd() {
|
||||
cmd-domains-set-global() {
|
||||
declare desc="set global domain names via command line"
|
||||
local cmd="domains:set-global"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify a domain name. Usage: dokku $1 <domain> [<domain> ...]"
|
||||
@@ -13,4 +13,4 @@ domains_set_global_cmd() {
|
||||
domains_set_global "$@"
|
||||
}
|
||||
|
||||
domains_set_global_cmd "$@"
|
||||
cmd-domains-set-global "$@"
|
||||
|
||||
@@ -4,11 +4,11 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
|
||||
|
||||
domains_setup_cmd() {
|
||||
cmd-domains-setup() {
|
||||
declare desc="setup domains to default state via command line"
|
||||
local cmd="domains:setup"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
domains_setup "$2"
|
||||
}
|
||||
|
||||
domains_setup_cmd "$@"
|
||||
cmd-domains-setup "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
enter_default_cmd() {
|
||||
cmd-enter-default() {
|
||||
declare desc="enters running app container of specified proc type"
|
||||
local cmd="enter"
|
||||
local APP="$2"
|
||||
@@ -63,4 +63,4 @@ enter_default_cmd() {
|
||||
"$DOCKER_BIN" container exec $DOKKU_RUN_OPTS $ID $EXEC_CMD "${@:-$DOKKU_APP_SHELL}"
|
||||
}
|
||||
|
||||
enter_default_cmd "$@"
|
||||
cmd-enter-default "$@"
|
||||
|
||||
@@ -6,15 +6,15 @@ source "$PLUGIN_AVAILABLE_PATH/git/internal-functions"
|
||||
|
||||
case "$1" in
|
||||
git-hook)
|
||||
git_hook_cmd "$@"
|
||||
cmd-git-hook "$@"
|
||||
;;
|
||||
|
||||
git-upload-pack)
|
||||
git_upload_pack_cmd "$@"
|
||||
cmd-git-upload-pack "$@"
|
||||
;;
|
||||
|
||||
git-*)
|
||||
git_glob_cmd "$@"
|
||||
cmd-git-glob "$@"
|
||||
;;
|
||||
|
||||
help | git:help)
|
||||
|
||||
@@ -123,7 +123,7 @@ git_deploy_branch() {
|
||||
fi
|
||||
}
|
||||
|
||||
git_hook_cmd() {
|
||||
cmd-git-hook() {
|
||||
declare desc="kick off receive-app trigger from git prereceive hook"
|
||||
local cmd="git-hook"
|
||||
local APP="$2"
|
||||
@@ -195,7 +195,7 @@ git_receive_app() {
|
||||
fi
|
||||
}
|
||||
|
||||
git_upload_pack_cmd() {
|
||||
cmd-git-upload-pack() {
|
||||
declare desc="executes git-upload-pack"
|
||||
declare cmd="git-upload-pack"
|
||||
declare APP="$2"
|
||||
@@ -208,7 +208,7 @@ git_upload_pack_cmd() {
|
||||
plugn trigger git-post-pull "$APP"
|
||||
}
|
||||
|
||||
git_glob_cmd() {
|
||||
cmd-git-glob() {
|
||||
declare desc="catch-all for any other git-* commands"
|
||||
local cmd="git-*"
|
||||
local APP="$(echo "$2" | perl -pe 's/(?<!\\)'\''//g' | sed 's/\\'\''/'\''/g' | sed 's/^\///g')"
|
||||
|
||||
@@ -4,7 +4,7 @@ source "$PLUGIN_AVAILABLE_PATH/git/functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
git-initialize-cmd() {
|
||||
cmd-git-initialize() {
|
||||
declare desc="initialize a git repository for an app"
|
||||
local cmd="git:initialize" argv=("$@")
|
||||
[[ ${argv[0]} == "$cmd" ]] && shift 1
|
||||
@@ -15,4 +15,4 @@ git-initialize-cmd() {
|
||||
fn-git-create-hook "$APP"
|
||||
}
|
||||
|
||||
git-initialize-cmd "$@"
|
||||
cmd-git-initialize "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
git-set-cmd() {
|
||||
cmd-git-set() {
|
||||
declare desc="set or clear a git property for an app"
|
||||
local cmd="git:set" argv=("$@")
|
||||
[[ ${argv[0]} == "$cmd" ]] && shift 1
|
||||
@@ -33,4 +33,4 @@ git-set-cmd() {
|
||||
fi
|
||||
}
|
||||
|
||||
git-set-cmd "$@"
|
||||
cmd-git-set "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/logs/internal-functions"
|
||||
|
||||
logs_default_cmd() {
|
||||
cmd-logs-default() {
|
||||
declare desc="display recent log output"
|
||||
local cmd="logs"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
@@ -53,4 +53,4 @@ logs_default_cmd() {
|
||||
plugn trigger scheduler-logs "$DOKKU_SCHEDULER" "$APP" "$PROCESS_TYPE" "$TAIL" "$PRETTY_PRINT" "$NUM"
|
||||
}
|
||||
|
||||
logs_default_cmd "$@"
|
||||
cmd-logs-default "$@"
|
||||
|
||||
@@ -6,7 +6,7 @@ set -eo pipefail
|
||||
|
||||
case "$1" in
|
||||
help | nginx:help)
|
||||
nginx_vhosts_help_cmd "$@"
|
||||
cmd-nginx-vhosts-help "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
|
||||
@@ -217,7 +217,7 @@ nginx_vhosts_help_content_func() {
|
||||
help_content
|
||||
}
|
||||
|
||||
nginx_vhosts_help_cmd() {
|
||||
cmd-nginx-vhosts-help() {
|
||||
if [[ $1 == "nginx:help" ]]; then
|
||||
echo -e 'Usage: dokku nginx[:COMMAND]'
|
||||
echo ''
|
||||
|
||||
@@ -4,11 +4,11 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/functions"
|
||||
|
||||
nginx_logs_cmd() {
|
||||
cmd-nginx-logs() {
|
||||
declare desc="display app nginx logs from command line"
|
||||
local cmd="$1"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
nginx_logs "$@"
|
||||
}
|
||||
|
||||
nginx_logs_cmd "$@"
|
||||
cmd-nginx-logs "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
|
||||
|
||||
nginx_build_config_cmd() {
|
||||
cmd-nginx-build-config() {
|
||||
declare desc="build nginx config to proxy app containers from command line"
|
||||
declare APP="$2"
|
||||
local cmd="nginx:build-config"
|
||||
@@ -19,4 +19,4 @@ nginx_build_config_cmd() {
|
||||
fi
|
||||
}
|
||||
|
||||
nginx_build_config_cmd "$@"
|
||||
cmd-nginx-build-config "$@"
|
||||
|
||||
@@ -3,4 +3,4 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/internal-functions"
|
||||
|
||||
nginx_vhosts_help_cmd "nginx:help"
|
||||
cmd-nginx-vhosts-help "nginx:help"
|
||||
|
||||
@@ -4,7 +4,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
nginx-set-cmd() {
|
||||
cmd-nginx-set() {
|
||||
declare desc="set or clear an nginx property for an app"
|
||||
local cmd="nginx:set" argv=("$@")
|
||||
[[ ${argv[0]} == "$cmd" ]] && shift 1
|
||||
@@ -26,4 +26,4 @@ nginx-set-cmd() {
|
||||
fi
|
||||
}
|
||||
|
||||
nginx-set-cmd "$@"
|
||||
cmd-nginx-set "$@"
|
||||
|
||||
@@ -3,7 +3,7 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
nginx_show_conf_cmd() {
|
||||
cmd-nginx-show-conf() {
|
||||
declare desc="display app nginx config"
|
||||
declare cmd="nginx:show-conf" argv=("$@")
|
||||
[[ ${argv[0]} == "$cmd" ]] && shift 1
|
||||
@@ -17,4 +17,4 @@ nginx_show_conf_cmd() {
|
||||
cat "$DOKKU_ROOT/$APP/nginx.conf"
|
||||
}
|
||||
|
||||
nginx_show_conf_cmd "$@"
|
||||
cmd-nginx-show-conf "$@"
|
||||
|
||||
@@ -4,11 +4,11 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/nginx-vhosts/functions"
|
||||
|
||||
nginx_validate_cmd() {
|
||||
cmd-nginx-validate() {
|
||||
declare desc="validates and optionally cleans up invalid nginx configurations"
|
||||
declare cmd="nginx:validate" argv=("$@")
|
||||
[[ ${argv[0]} == "$cmd" ]] && shift 1
|
||||
validate_nginx "$@"
|
||||
}
|
||||
|
||||
nginx_validate_cmd "$@"
|
||||
cmd-nginx-validate "$@"
|
||||
|
||||
@@ -3,7 +3,7 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
plugin_list_cmd() {
|
||||
cmd-plugin-list() {
|
||||
declare desc="lists all plugins"
|
||||
local cmd="plugin"
|
||||
|
||||
|
||||
@@ -5,4 +5,4 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/plugin/internal-functions"
|
||||
|
||||
dokku_log_warn "Deprecated: Please use plugin:list"
|
||||
plugin_list_cmd "$@"
|
||||
cmd-plugin-list "$@"
|
||||
|
||||
@@ -5,7 +5,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/plugin/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/plugin/internal-functions"
|
||||
|
||||
plugin_disable_cmd() {
|
||||
cmd-plugin-disable() {
|
||||
declare desc="disables plugin via command line"
|
||||
local cmd="plugin:disable"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify a plugin to disable"
|
||||
@@ -14,4 +14,4 @@ plugin_disable_cmd() {
|
||||
plugin_prime_bash_completion
|
||||
}
|
||||
|
||||
plugin_disable_cmd "$@"
|
||||
cmd-plugin-disable "$@"
|
||||
|
||||
@@ -5,7 +5,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/plugin/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/plugin/internal-functions"
|
||||
|
||||
plugin_enable_cmd() {
|
||||
cmd-plugin-enable() {
|
||||
declare desc="enables plugin via command line"
|
||||
local cmd="plugin:enable"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify a plugin to enable"
|
||||
@@ -14,4 +14,4 @@ plugin_enable_cmd() {
|
||||
plugin_prime_bash_completion
|
||||
}
|
||||
|
||||
plugin_enable_cmd "$@"
|
||||
cmd-plugin-enable "$@"
|
||||
|
||||
@@ -5,7 +5,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/plugin/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/plugin/internal-functions"
|
||||
|
||||
plugin_install_cmd() {
|
||||
cmd-plugin-install() {
|
||||
declare desc="installs a plugin from URL and calls install plugin trigger via command line"
|
||||
local cmd="plugin:install"
|
||||
case "$2" in
|
||||
@@ -25,4 +25,4 @@ plugin_install_cmd() {
|
||||
plugin_prime_bash_completion
|
||||
}
|
||||
|
||||
plugin_install_cmd "$@"
|
||||
cmd-plugin-install "$@"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
plugin_install_dependencies_cmd() {
|
||||
cmd-plugin-install-dependencies() {
|
||||
declare desc="calls dependencies plugin trigger via command line"
|
||||
local cmd="plugin:install-dependencies"
|
||||
if [[ $2 == "--core" ]]; then
|
||||
@@ -11,4 +11,4 @@ plugin_install_dependencies_cmd() {
|
||||
plugn trigger dependencies
|
||||
}
|
||||
|
||||
plugin_install_dependencies_cmd "$@"
|
||||
cmd-plugin-install-dependencies "$@"
|
||||
|
||||
@@ -3,4 +3,4 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_AVAILABLE_PATH/plugin/internal-functions"
|
||||
|
||||
plugin_list_cmd "$@"
|
||||
cmd-plugin-list "$@"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
plugin_trigger_cmd() {
|
||||
cmd-plugin-trigger() {
|
||||
declare desc="trigger an arbitrary plugin hook"
|
||||
local cmd="plugin:trigger"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
@@ -10,4 +10,4 @@ plugin_trigger_cmd() {
|
||||
plugn trigger "$@"
|
||||
}
|
||||
|
||||
plugin_trigger_cmd "$@"
|
||||
cmd-plugin-trigger "$@"
|
||||
|
||||
@@ -5,7 +5,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/plugin/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/plugin/internal-functions"
|
||||
|
||||
plugin_uninstall_cmd() {
|
||||
cmd-plugin-uninstall() {
|
||||
declare desc="uninstalls plugin via command line"
|
||||
local cmd="plugin:uninstall"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify a plugin to uninstall"
|
||||
@@ -14,4 +14,4 @@ plugin_uninstall_cmd() {
|
||||
plugin_prime_bash_completion
|
||||
}
|
||||
|
||||
plugin_uninstall_cmd "$@"
|
||||
cmd-plugin-uninstall "$@"
|
||||
|
||||
@@ -3,7 +3,7 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_AVAILABLE_PATH/plugin/internal-functions"
|
||||
|
||||
plugin_update_cmd() {
|
||||
cmd-plugin-update() {
|
||||
declare desc="updates plugin to optional committish and calls update plugin trigger via command line"
|
||||
local cmd="plugin:update"
|
||||
if [[ -n "$2" ]]; then
|
||||
@@ -15,4 +15,4 @@ plugin_update_cmd() {
|
||||
plugin_prime_bash_completion
|
||||
}
|
||||
|
||||
plugin_update_cmd "$@"
|
||||
cmd-plugin-update "$@"
|
||||
|
||||
@@ -6,7 +6,7 @@ set -eo pipefail
|
||||
|
||||
case "$1" in
|
||||
help | proxy:help)
|
||||
proxy_help_cmd "$@"
|
||||
cmd-proxy-help "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
|
||||
@@ -92,7 +92,7 @@ proxy_help_content_func() {
|
||||
help_content
|
||||
}
|
||||
|
||||
proxy_help_cmd() {
|
||||
cmd-proxy-help() {
|
||||
if [[ $1 == "proxy:help" ]]; then
|
||||
echo -e 'Usage: dokku proxy[:COMMAND]'
|
||||
echo ''
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
|
||||
|
||||
proxy_main_cmd() {
|
||||
cmd-proxy-default() {
|
||||
declare desc="displays app proxy implementation via command line"
|
||||
local cmd="proxy"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
@@ -22,4 +22,4 @@ proxy_main_cmd() {
|
||||
done
|
||||
}
|
||||
|
||||
proxy_main_cmd "$@"
|
||||
cmd-proxy-default "$@"
|
||||
|
||||
@@ -5,7 +5,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
|
||||
|
||||
proxy_disable_cmd() {
|
||||
cmd-proxy-disable() {
|
||||
declare desc="disable proxy for app via command line"
|
||||
local cmd="proxy:disable"
|
||||
[[ -z $1 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
@@ -23,4 +23,4 @@ proxy_disable_cmd() {
|
||||
fi
|
||||
}
|
||||
|
||||
proxy_disable_cmd "$2" --no-restart
|
||||
cmd-proxy-disable "$2" --no-restart
|
||||
|
||||
@@ -5,7 +5,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
|
||||
|
||||
proxy_enable_cmd() {
|
||||
cmd-proxy-enable() {
|
||||
declare desc="enable proxy for app via command line"
|
||||
local cmd="proxy:enable"
|
||||
[[ -z $1 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
@@ -23,4 +23,4 @@ proxy_enable_cmd() {
|
||||
fi
|
||||
}
|
||||
|
||||
proxy_enable_cmd "$2" --no-restart
|
||||
cmd-proxy-enable "$2" --no-restart
|
||||
|
||||
@@ -5,7 +5,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
proxy_ports_cmd() {
|
||||
cmd-proxy-ports() {
|
||||
declare desc="cmd wrapper to list proxy port mappings for an app"
|
||||
local cmd="proxy:ports"
|
||||
local APP="$2"
|
||||
@@ -14,4 +14,4 @@ proxy_ports_cmd() {
|
||||
list_app_proxy_ports "$APP"
|
||||
}
|
||||
|
||||
proxy_ports_cmd "$@"
|
||||
cmd-proxy-ports "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
|
||||
|
||||
proxy_ports_add_cmd() {
|
||||
cmd-proxy-ports-add() {
|
||||
declare desc="add proxy port mappings to an app"
|
||||
local cmd="proxy:add"
|
||||
local APP="$2"
|
||||
@@ -15,4 +15,4 @@ proxy_ports_add_cmd() {
|
||||
plugn trigger post-proxy-ports-update "$APP" "add"
|
||||
}
|
||||
|
||||
proxy_ports_add_cmd "$@"
|
||||
cmd-proxy-ports-add "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
proxy_ports_clear_cmd() {
|
||||
cmd-proxy-ports-clear() {
|
||||
declare desc="clear all proxy port mappings for an app"
|
||||
local cmd="proxy:clear"
|
||||
local APP="$2"
|
||||
@@ -14,4 +14,4 @@ proxy_ports_clear_cmd() {
|
||||
plugn trigger post-proxy-ports-update "$APP" "clear"
|
||||
}
|
||||
|
||||
proxy_ports_clear_cmd "$@"
|
||||
cmd-proxy-ports-clear "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
|
||||
|
||||
proxy_ports_remove_cmd() {
|
||||
cmd-proxy-ports-remove() {
|
||||
declare desc="remove specific proxy port mappings from an app"
|
||||
local cmd="proxy:ports-remove"
|
||||
local APP="$2"
|
||||
@@ -22,4 +22,4 @@ proxy_ports_remove_cmd() {
|
||||
plugn trigger post-proxy-ports-update "$APP" "remove"
|
||||
}
|
||||
|
||||
proxy_ports_remove_cmd "$@"
|
||||
cmd-proxy-ports-remove "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/proxy/functions"
|
||||
|
||||
proxy_ports_set_cmd() {
|
||||
cmd-proxy-ports-set() {
|
||||
declare desc="set proxy port mappings for an app"
|
||||
local cmd="proxy:set"
|
||||
local APP="$2"
|
||||
@@ -15,4 +15,4 @@ proxy_ports_set_cmd() {
|
||||
plugn trigger post-proxy-ports-update "$APP" "set"
|
||||
}
|
||||
|
||||
proxy_ports_set_cmd "$@"
|
||||
cmd-proxy-ports-set "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
proxy_set_cmd() {
|
||||
cmd-proxy-set() {
|
||||
declare desc="enable proxy for app via command line"
|
||||
local cmd="proxy:set"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
@@ -20,4 +20,4 @@ proxy_set_cmd() {
|
||||
fi
|
||||
}
|
||||
|
||||
proxy_set_cmd "$@"
|
||||
cmd-proxy-set "$@"
|
||||
|
||||
@@ -3,7 +3,7 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
ps_main_cmd() {
|
||||
cmd-ps-default() {
|
||||
declare desc="shows running processes in all running app containers"
|
||||
local cmd="ps"
|
||||
dokku_log_warn "Deprecated: Please use ps:report"
|
||||
@@ -25,4 +25,4 @@ ps_main_cmd() {
|
||||
done
|
||||
}
|
||||
|
||||
ps_main_cmd "$@"
|
||||
cmd-ps-default "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
|
||||
|
||||
ps_rebuild_cmd() {
|
||||
cmd-ps-rebuild() {
|
||||
declare desc="rebuilds an app from source"
|
||||
local cmd="ps:rebuild"
|
||||
local APP="$2"
|
||||
@@ -17,4 +17,4 @@ ps_rebuild_cmd() {
|
||||
fi
|
||||
}
|
||||
|
||||
ps_rebuild_cmd "$@"
|
||||
cmd-ps-rebuild "$@"
|
||||
|
||||
@@ -4,11 +4,11 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/ps/internal-functions"
|
||||
|
||||
ps_rebuildall_cmd() {
|
||||
cmd-ps-rebuildall() {
|
||||
declare desc="rebuilds all apps from source"
|
||||
local cmd="ps:rebuildall"
|
||||
|
||||
fn-ps-parallel-cmd "rebuild"
|
||||
}
|
||||
|
||||
ps_rebuildall_cmd "$@"
|
||||
cmd-ps-rebuildall "$@"
|
||||
|
||||
@@ -4,11 +4,11 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
|
||||
|
||||
ps_restart_cmd() {
|
||||
cmd-ps-restart() {
|
||||
declare desc="restarts app via command line"
|
||||
local cmd="ps:restart"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
ps_restart "$2"
|
||||
}
|
||||
|
||||
ps_restart_cmd "$@"
|
||||
cmd-ps-restart "$@"
|
||||
|
||||
@@ -5,7 +5,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/docker-options/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
|
||||
|
||||
ps_restart_policy_cmd() {
|
||||
cmd-ps-restart-policy() {
|
||||
declare desc="shows the restart-policy for an app"
|
||||
local cmd="ps:restart-policy"
|
||||
local passed_phases="deploy"
|
||||
@@ -16,4 +16,4 @@ ps_restart_policy_cmd() {
|
||||
get_restart_policies "$(get_phase_file_path "$passed_phases")"
|
||||
}
|
||||
|
||||
ps_restart_policy_cmd "$@"
|
||||
cmd-ps-restart-policy "$@"
|
||||
|
||||
@@ -4,11 +4,11 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/ps/internal-functions"
|
||||
|
||||
ps_restartall_cmd() {
|
||||
cmd-ps-restartall() {
|
||||
declare desc="restarts all apps via command line"
|
||||
local cmd="ps:restartall"
|
||||
|
||||
fn-ps-parallel-cmd "restart"
|
||||
}
|
||||
|
||||
ps_restartall_cmd "$@"
|
||||
cmd-ps-restartall "$@"
|
||||
|
||||
@@ -6,7 +6,7 @@ source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/ps/internal-functions"
|
||||
|
||||
ps_restore_cmd() {
|
||||
cmd-ps-restore() {
|
||||
declare desc="starts all apps with DOKKU_APP_RESTORE not set to 0 via command line"
|
||||
local cmd="ps:restore"
|
||||
local APP="$2"
|
||||
@@ -30,4 +30,4 @@ ps_restore_cmd() {
|
||||
fi
|
||||
}
|
||||
|
||||
ps_restore_cmd "$@"
|
||||
cmd-ps-restore "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
ps_retire_cmd() {
|
||||
cmd-ps-retire() {
|
||||
declare desc="ensures old containers are retired"
|
||||
local cmd="ps:retire"
|
||||
local LOCK_FILE="${DOKKU_LIB_ROOT}/data/ps/retire"
|
||||
@@ -15,4 +15,4 @@ ps_retire_cmd() {
|
||||
release_advisory_lock "$LOCK_FILE"
|
||||
}
|
||||
|
||||
ps_retire_cmd "$@"
|
||||
cmd-ps-retire "$@"
|
||||
|
||||
@@ -4,7 +4,7 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
|
||||
|
||||
ps_scale_cmd() {
|
||||
cmd-ps-scale() {
|
||||
declare desc="sets app scaling config via command line"
|
||||
local cmd="ps:scale"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
@@ -12,4 +12,4 @@ ps_scale_cmd() {
|
||||
ps_scale "$@"
|
||||
}
|
||||
|
||||
ps_scale_cmd "$@"
|
||||
cmd-ps-scale "$@"
|
||||
|
||||
@@ -5,7 +5,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/docker-options/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
|
||||
|
||||
ps_set_restart_policy_cmd() {
|
||||
cmd-ps-set-restart-policy() {
|
||||
declare desc="sets app restart-policy"
|
||||
local cmd="ps:set-restart-policy"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
@@ -29,4 +29,4 @@ ps_set_restart_policy_cmd() {
|
||||
add_passed_docker_option passed_phases[@] "--restart=${RESTART_POLICY}"
|
||||
}
|
||||
|
||||
ps_set_restart_policy_cmd "$@"
|
||||
cmd-ps-set-restart-policy "$@"
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user