[config] lint fixes
This commit is contained in:
@@ -57,7 +57,7 @@ execute_script() {
|
||||
|
||||
# eval args as array to respect escapes
|
||||
declare -a ARG_ARRAY
|
||||
eval ARG_ARRAY=($DOCKER_ARGS)
|
||||
eval "ARG_ARRAY=($DOCKER_ARGS)"
|
||||
|
||||
local id=$(docker run "$DOKKU_GLOBAL_RUN_ARGS" -e DOKKU_TRACE="$DOKKU_TRACE" --label=dokku_phase_script="${PHASE_SCRIPT_KEY}" -d -v "$CACHE_DIR:/cache" "${ARG_ARRAY[@]}" "$IMAGE" /bin/bash -c "$COMMAND")
|
||||
if test "$(docker wait "$id")" -eq 0; then
|
||||
|
||||
@@ -29,7 +29,7 @@ app_user_pre_deploy_trigger() {
|
||||
if [[ -n "$APP_PATHS" ]]; then
|
||||
CONTAINER_PATHS=$(echo "$APP_PATHS" | awk -F ':' '{ print $2 }' | xargs)
|
||||
DOCKER_ARGS=$(: | plugn trigger docker-args-deploy "$APP" "$IMAGE_TAG")
|
||||
eval ARG_ARRAY=($DOCKER_ARGS)
|
||||
eval "ARG_ARRAY=($DOCKER_ARGS)"
|
||||
fi
|
||||
|
||||
if [[ "$DOKKU_APP_TYPE" == "herokuish" ]] && [[ -n "$CONTAINER_PATHS" ]]; then
|
||||
|
||||
@@ -23,7 +23,7 @@ dokku_run_cmd() {
|
||||
[[ "$DOKKU_TRACE" ]] && local DOCKER_ARGS+=" -e TRACE=true "
|
||||
|
||||
declare -a ARG_ARRAY
|
||||
eval ARG_ARRAY=($DOCKER_ARGS)
|
||||
eval "ARG_ARRAY=($DOCKER_ARGS)"
|
||||
|
||||
local DOKKU_RUN_OPTS=" -e DYNO=run.$RANDOM"
|
||||
if [[ "$DOKKU_RM_CONTAINER" ]]; then
|
||||
|
||||
@@ -459,7 +459,7 @@ dokku_build() {
|
||||
local DOCKER_ARGS=$(: | plugn trigger docker-args-build "$APP" "$IMAGE_SOURCE_TYPE")
|
||||
[[ "$DOKKU_TRACE" ]] && DOCKER_ARGS+=" -e TRACE=true "
|
||||
declare -a ARG_ARRAY
|
||||
eval ARG_ARRAY=($DOCKER_ARGS)
|
||||
eval "ARG_ARRAY=($DOCKER_ARGS)"
|
||||
# shellcheck disable=SC2086
|
||||
local id=$(docker run $DOKKU_GLOBAL_RUN_ARGS -d -v $CACHE_DIR:/cache -e CACHE_PATH=/cache "${ARG_ARRAY[@]}" $IMAGE /build)
|
||||
docker attach "$id"
|
||||
@@ -486,7 +486,7 @@ dokku_build() {
|
||||
# strip --volume and -v args from DOCKER_ARGS
|
||||
local DOCKER_ARGS=$(sed -e "s/--volume=[[:graph:]]\+[[:blank:]]\?//g" -e "s/-v[[:blank:]]\?[[:graph:]]\+[[:blank:]]\?//g" <<< "$DOCKER_ARGS")
|
||||
declare -a ARG_ARRAY
|
||||
eval ARG_ARRAY=($DOCKER_ARGS)
|
||||
eval "ARG_ARRAY=($DOCKER_ARGS)"
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
docker build "${ARG_ARRAY[@]}" $DOKKU_DOCKER_BUILD_OPTS -t $IMAGE .
|
||||
@@ -588,7 +588,7 @@ dokku_deploy_cmd() {
|
||||
[[ "$DOKKU_TRACE" ]] && DOCKER_ARGS+=" -e TRACE=true "
|
||||
|
||||
declare -a ARG_ARRAY
|
||||
eval ARG_ARRAY=($DOCKER_ARGS)
|
||||
eval "ARG_ARRAY=($DOCKER_ARGS)"
|
||||
|
||||
[[ -n "$DOKKU_HEROKUISH" ]] && local START_CMD="/start $PROC_TYPE"
|
||||
|
||||
|
||||
@@ -2,39 +2,44 @@
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
|
||||
config_sub(){
|
||||
declare desc="executes a config subcommand"
|
||||
local name="$1"
|
||||
shift
|
||||
"$PLUGIN_AVAILABLE_PATH/config/subcommands/$name" "config:$name" "$@"
|
||||
}
|
||||
|
||||
config_export() {
|
||||
declare desc="returns export command for config variable of specified type (app/global)"
|
||||
local CONFIG_TYPE="$1"
|
||||
local APP="$2"
|
||||
shift
|
||||
local APP="$1"
|
||||
if [[ $CONFIG_TYPE == "global" ]]; then
|
||||
APP="--global"
|
||||
else
|
||||
shift
|
||||
fi
|
||||
$PLUGIN_AVAILABLE_PATH/config/subcommands/export config:export "$APP"
|
||||
config_sub export "$@" "$APP"
|
||||
return 0
|
||||
}
|
||||
|
||||
config_keys() {
|
||||
declare desc="returns keys for app or global"
|
||||
local CONFIG_TYPE="$1"
|
||||
local APP="$2"
|
||||
if [[ $CONFIG_TYPE == "global" ]]; then
|
||||
APP="--global"
|
||||
fi
|
||||
$PLUGIN_AVAILABLE_PATH/config/subcommands/export config:export --keys "$APP"
|
||||
config_export "$@" "--keys"
|
||||
return 0
|
||||
}
|
||||
|
||||
config_get() {
|
||||
declare desc="get value of given config var"
|
||||
$PLUGIN_AVAILABLE_PATH/config/subcommands/get config:get "$@"
|
||||
config_sub get "$@"
|
||||
}
|
||||
|
||||
config_set() {
|
||||
declare desc="set value of given config var"
|
||||
$PLUGIN_AVAILABLE_PATH/config/subcommands/set config:set "$@"
|
||||
config_sub set "$@"
|
||||
}
|
||||
|
||||
config_unset() {
|
||||
declare desc="set value of given config var"
|
||||
$PLUGIN_AVAILABLE_PATH/config/subcommands/unset config:unset "$@"
|
||||
config_sub unset "$@"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user