refactor: unify command declaration across codebase
This commit is contained in:
@@ -5,8 +5,9 @@ source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
cmd-report() {
|
||||
declare desc="reports dokku vitals for troubleshooting"
|
||||
local cmd="report"
|
||||
declare APP="$2"
|
||||
declare cmd="report"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
declare APP="$1"
|
||||
|
||||
dokku_log_info1 "uname: $(uname -a)"
|
||||
dokku_log_info1 "memory: "
|
||||
|
||||
@@ -2,12 +2,12 @@
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
|
||||
cmd-run() {
|
||||
declare desc="runs command in container based on app image"
|
||||
declare cmd="run" APP=""
|
||||
shift
|
||||
declare cmd="run"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
declare APP=""
|
||||
|
||||
declare -a RUN_ENV
|
||||
RUN_ENV=()
|
||||
|
||||
@@ -4,8 +4,11 @@ set -eo pipefail
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
cmd-urls() {
|
||||
declare desc="reports dokku vitals for troubleshooting"
|
||||
declare cmd="url"
|
||||
declare APP="$2"
|
||||
|
||||
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
local APP="$2"
|
||||
|
||||
get_app_urls "$@"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user