Drop another ~1k lines from DOKKU_TRACE output
This commit is contained in:
@@ -2,10 +2,6 @@
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
PHASES=(build deploy run)
|
||||
|
||||
FILE_PREFIX="DOCKER_OPTIONS_"
|
||||
|
||||
get_app() {
|
||||
[[ -z $1 ]] && dokku_log_fail "Please specify an app to run the command on"
|
||||
verify_app_name "$1"
|
||||
@@ -25,17 +21,19 @@ get_phases() {
|
||||
|
||||
verify_phase() {
|
||||
local phase
|
||||
for phase in "${PHASES[@]}"; do
|
||||
local phases=(build deploy run)
|
||||
for phase in "${phases[@]}"; do
|
||||
if [[ "$phase" = "$1" ]]; then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
dokku_log_fail "Phase(s) must be one of [${PHASES[@]}]"
|
||||
dokku_log_fail "Phase(s) must be one of [${phases[@]}]"
|
||||
}
|
||||
|
||||
get_phase_file_path() {
|
||||
local phase=$1
|
||||
phase_file_path="${DOKKU_ROOT}/${APP}/${FILE_PREFIX}${phase^^}"
|
||||
local prefix="DOCKER_OPTIONS_"
|
||||
phase_file_path="${DOKKU_ROOT}/${APP}/${prefix}${phase^^}"
|
||||
}
|
||||
|
||||
create_phase_file_if_required() {
|
||||
@@ -53,7 +51,8 @@ display_phase_options() {
|
||||
}
|
||||
|
||||
display_all_phases_options() {
|
||||
for phase in "${PHASES[@]}"; do
|
||||
local phases=(build deploy run)
|
||||
for phase in "${phases[@]}"; do
|
||||
get_phase_file_path $phase
|
||||
if [[ -s $phase_file_path ]]; then
|
||||
display_phase_options $phase $phase_file_path
|
||||
|
||||
Reference in New Issue
Block a user