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:
@@ -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 "$@"
|
||||
|
||||
Reference in New Issue
Block a user