feat: split stack property into per-builder properties

The `stack` property lived on the `buildpacks` plugin but was shared by both the herokuish and pack builders, so a value valid for one builder broke the other. Each builder now owns its own `stack` property managed via `builder-herokuish:set` and `builder-pack:set`, while `buildpacks:set-property stack` is deprecated and forwards the value to the builder detected from it; existing values migrate automatically on upgrade and changing a builder's stack clears that builder's cache.
This commit is contained in:
Jose Diaz-Gonzalez committed 2026-11-02 16:48:11 -05:00
1 parent 5ef061d3d2
commit 59594937f9
23 files changed
+449 -178

No files matched your search

+10 -2
View File
@@ -9,13 +9,13 @@ cmd-builder-pack-set() {
declare cmd="builder-pack:set"
[[ "$1" == "$cmd" ]] && shift 1
declare APP="$1" KEY="$2" VALUE="$3"
local VALID_KEYS=("projecttoml-path")
local VALID_KEYS=("projecttoml-path" "stack")
[[ "$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: projecttoml-path"
dokku_log_fail "Invalid key specified, valid keys include: projecttoml-path, stack"
fi
if [[ -n "$VALUE" ]]; then
@@ -25,6 +25,14 @@ cmd-builder-pack-set() {
dokku_log_info2_quiet "Unsetting ${KEY}"
fn-plugin-property-delete "builder-pack" "$APP" "$KEY"
fi
if [[ "$KEY" == "stack" ]]; then
if [[ "$APP" == "--global" ]]; then
for app in $(dokku_apps 2>/dev/null || true); do fn-plugin-property-write "builder-pack" "$app" "clear-cache" "true"; done
else
fn-plugin-property-write "builder-pack" "$APP" "clear-cache" "true"
fi
fi
}
cmd-builder-pack-set "$@"