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 | storage:help)
|
||||
storage_help_cmd "$@"
|
||||
cmd-storage-help "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
|
||||
@@ -85,7 +85,7 @@ storage_help_content_func() {
|
||||
help_content
|
||||
}
|
||||
|
||||
storage_help_cmd() {
|
||||
cmd-storage-help() {
|
||||
if [[ $1 == "storage:help" ]]; then
|
||||
echo -e 'Usage: dokku storage[:COMMAND]'
|
||||
echo ''
|
||||
@@ -102,7 +102,7 @@ help_desc
|
||||
fi
|
||||
}
|
||||
|
||||
storage_list_cmd() {
|
||||
cmd-storage-list() {
|
||||
declare desc="List all bound mounts"
|
||||
local cmd="storage:list"
|
||||
local passed_phases="deploy"
|
||||
|
||||
@@ -3,4 +3,4 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_AVAILABLE_PATH/storage/internal-functions"
|
||||
|
||||
storage_help_cmd "storage:help"
|
||||
cmd-storage-help "storage:help"
|
||||
|
||||
@@ -3,4 +3,4 @@ set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_AVAILABLE_PATH/storage/internal-functions"
|
||||
|
||||
storage_list_cmd "$@"
|
||||
cmd-storage-list "$@"
|
||||
|
||||
@@ -5,7 +5,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/storage/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/docker-options/functions"
|
||||
|
||||
storage_mount_cmd() {
|
||||
cmd-storage-mount() {
|
||||
declare desc="Add bind-mount, redeploy app if running"
|
||||
local cmd="storage:mount"
|
||||
local passed_phases=(deploy run)
|
||||
@@ -16,4 +16,4 @@ storage_mount_cmd() {
|
||||
add_passed_docker_option passed_phases[@] "-v $MOUNT_PATH"
|
||||
}
|
||||
|
||||
storage_mount_cmd "$@"
|
||||
cmd-storage-mount "$@"
|
||||
|
||||
@@ -5,7 +5,7 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/storage/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/docker-options/functions"
|
||||
|
||||
storage_unmount_cmd() {
|
||||
cmd-storage-unmount() {
|
||||
declare desc="Remove bind-mount, restart app if running"
|
||||
local cmd="storage:unmount"
|
||||
local passed_phases=(deploy run)
|
||||
@@ -16,4 +16,4 @@ storage_unmount_cmd() {
|
||||
remove_passed_docker_option passed_phases[@] "-v $MOUNT_PATH"
|
||||
}
|
||||
|
||||
storage_unmount_cmd "$@"
|
||||
cmd-storage-unmount "$@"
|
||||
|
||||
Reference in New Issue
Block a user