refactor: unify command declaration across codebase

This commit is contained in:
Jose Diaz-Gonzalez
2020-02-10 01:40:30 -05:00
parent b0abeb49dd
commit e67b96780d
108 changed files with 475 additions and 315 deletions

View File

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

View File

@@ -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=()

View File

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