refactor: remove support for the railpack no-cache property
This replicates the docker-options functionality.
This commit is contained in:
@@ -35,7 +35,6 @@ trigger-builder-railpack-builder-build() {
|
||||
|
||||
local DOCKER_ARGS=$(: | plugn trigger docker-args-build "$APP" "$BUILDER_TYPE")
|
||||
DOCKER_ARGS+=$(: | plugn trigger docker-args-process-build "$APP" "$BUILDER_TYPE")
|
||||
[[ "$(fn-builder-railpack-computed-no-cache "$APP")" == "true" ]] && DOCKER_ARGS+=" --no-cache"
|
||||
|
||||
DOCKER_ARGS=" $DOCKER_ARGS "
|
||||
eval set -- "$DOCKER_ARGS"
|
||||
|
||||
@@ -38,9 +38,6 @@ cmd-builder-railpack-report-single() {
|
||||
"--builder-railpack-computed-railpackjson-path: $(fn-builder-railpack-computed-railpackjson-path "$APP")"
|
||||
"--builder-railpack-global-railpackjson-path: $(fn-builder-railpack-global-railpackjson-path "$APP")"
|
||||
"--builder-railpack-railpackjson-path: $(fn-builder-railpack-railpackjson-path "$APP")"
|
||||
"--builder-railpack-computed-no-cache: $(fn-builder-railpack-computed-no-cache "$APP")"
|
||||
"--builder-railpack-global-no-cache: $(fn-builder-railpack-global-no-cache "$APP")"
|
||||
"--builder-railpack-no-cache: $(fn-builder-railpack-no-cache "$APP")"
|
||||
)
|
||||
|
||||
if [[ -z "$INFO_FLAG" ]]; then
|
||||
@@ -91,26 +88,3 @@ fn-builder-railpack-railpackjson-path() {
|
||||
|
||||
fn-plugin-property-get "builder-railpack" "$APP" "railpackjson-path" ""
|
||||
}
|
||||
|
||||
fn-builder-railpack-computed-no-cache() {
|
||||
declare APP="$1"
|
||||
|
||||
file="$(fn-builder-railpack-no-cache "$APP")"
|
||||
if [[ "$file" == "" ]]; then
|
||||
file="$(fn-builder-railpack-global-no-cache "$APP")"
|
||||
fi
|
||||
|
||||
echo "$file"
|
||||
}
|
||||
|
||||
fn-builder-railpack-global-no-cache() {
|
||||
declare APP="$1"
|
||||
|
||||
fn-plugin-property-get "builder-railpack" "--global" "no-cache" "false"
|
||||
}
|
||||
|
||||
fn-builder-railpack-no-cache() {
|
||||
declare APP="$1"
|
||||
|
||||
fn-plugin-property-get "builder-railpack" "$APP" "no-cache" ""
|
||||
}
|
||||
|
||||
@@ -9,13 +9,13 @@ cmd-builder-railpack-set() {
|
||||
declare cmd="builder-railpack:set"
|
||||
[[ "$1" == "$cmd" ]] && shift 1
|
||||
declare APP="$1" KEY="$2" VALUE="$3"
|
||||
local VALID_KEYS=("railpackjson-path" "no-cache")
|
||||
local VALID_KEYS=("railpackjson-path")
|
||||
[[ "$APP" == "--global" ]] || verify_app_name "$APP"
|
||||
|
||||
[[ -z "$KEY" ]] && dokku_log_fail "No key specified"
|
||||
|
||||
if ! fn-in-array "$KEY" "${VALID_KEYS[@]}"; then
|
||||
dokku_log_fail "Invalid key specified, valid keys include: railpackjson-path, no-cache"
|
||||
dokku_log_fail "Invalid key specified, valid keys include: railpackjson-path"
|
||||
fi
|
||||
|
||||
if [[ -n "$VALUE" ]]; then
|
||||
|
||||
Reference in New Issue
Block a user