mirror of
https://github.com/dokku/dokku.git
synced 2025-12-29 00:25:08 +01:00
refactor: move command to internal-functions
This commit is contained in:
@@ -3,16 +3,6 @@ set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/docker-options/functions"
|
||||
|
||||
storage_list_cmd() {
|
||||
declare desc="List all bound mounts"
|
||||
local cmd="storage:list"
|
||||
local passed_phases="deploy"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
verify_app_name "$2" && local APP="$2"
|
||||
echo "$APP volume bind-mounts:"
|
||||
get_bind_mounts "$(get_phase_file_path "$passed_phases")"
|
||||
}
|
||||
|
||||
verify_paths() {
|
||||
declare desc="verifies storage paths"
|
||||
echo "$1" | grep -qe '^/.*\:/' || dokku_log_fail "Storage path must be two valid paths divided by colon."
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/docker-options/functions"
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/storage/functions"
|
||||
|
||||
storage_help_content_func() {
|
||||
declare desc="return storage plugin help content"
|
||||
@@ -26,3 +29,13 @@ storage_help_cmd() {
|
||||
help_desc
|
||||
fi
|
||||
}
|
||||
|
||||
storage_list_cmd() {
|
||||
declare desc="List all bound mounts"
|
||||
local cmd="storage:list"
|
||||
local passed_phases="deploy"
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
verify_app_name "$2" && local APP="$2"
|
||||
echo "$APP volume bind-mounts:"
|
||||
get_bind_mounts "$(get_phase_file_path "$passed_phases")"
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/storage/functions"
|
||||
|
||||
source "$PLUGIN_AVAILABLE_PATH/storage/internal-functions"
|
||||
|
||||
storage_list_cmd "$@"
|
||||
|
||||
Reference in New Issue
Block a user