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

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -4,11 +4,11 @@ set -eo pipefail
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
ps_start_cmd() {
cmd-ps-start() {
declare desc="starts app via command line"
local cmd="ps:start"
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
ps_start "$2"
}
ps_start_cmd "$@"
cmd-ps-start "$@"

View File

@@ -4,11 +4,11 @@ set -eo pipefail
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/ps/internal-functions"
ps_startall_cmd() {
cmd-ps-startall() {
declare desc="starts all apps via command line"
local cmd="ps:startall"
fn-ps-parallel-cmd "start"
}
ps_startall_cmd "$@"
cmd-ps-startall "$@"

View File

@@ -4,11 +4,11 @@ set -eo pipefail
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
ps_stop_cmd() {
cmd-ps-stop() {
declare desc="stops app via command line"
local cmd="ps:stop"
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
ps_stop "$2"
}
ps_stop_cmd "$@"
cmd-ps-stop "$@"

View File

@@ -4,11 +4,11 @@ set -eo pipefail
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/ps/internal-functions"
ps_stopall_cmd() {
cmd-ps-stopall() {
declare desc="stops all apps via command line"
local cmd="ps:stopall"
fn-ps-parallel-cmd "stop"
}
ps_stopall_cmd "$@"
cmd-ps-stopall "$@"