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