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:
Jose Diaz-Gonzalez
2020-02-09 22:41:39 -05:00
parent deea791e58
commit 1cb586b2e7
134 changed files with 246 additions and 245 deletions

View File

@@ -6,7 +6,7 @@ set -eo pipefail
case "$1" in
help | apps:help)
apps_help_cmd "$@"
cmd-apps-help "$@"
;;
*)

View File

@@ -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

View File

@@ -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 "$@"

View File

@@ -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 "$@"

View File

@@ -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 "$@"

View File

@@ -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 "$@"

View File

@@ -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 "$@"

View File

@@ -3,4 +3,4 @@ set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_AVAILABLE_PATH/apps/internal-functions"
apps_list_cmd "$@"
cmd-apps-list "$@"

View File

@@ -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 "$@"

View File

@@ -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 "$@"

View File

@@ -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 "$@"

View File

@@ -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 "$@"