feat: allow users to enable herokuish usage on arm/arm64 platforms

While the majority of buildpacks do not work on non-amd64 platforms, this will at least allow developers the option to choose when to override this setting.
This commit is contained in:
Jose Diaz-Gonzalez
2022-11-24 14:43:47 -05:00
parent 25beb2af13
commit 1238c8d7e0
10 changed files with 352 additions and 11 deletions

View File

@@ -60,15 +60,17 @@ git_trigger_build() {
BUILDER="$(plugn trigger builder-detect "$APP" "$TMP_WORK_DIR" | head -n1 || true)"
if [[ -z "$BUILDER" ]]; then
BUILDER="herokuish"
local ARCHITECTURE="$(dpkg --print-architecture 2>/dev/null || true)"
if [[ "$ARCHITECTURE" == "arm64" ]]; then
dokku_log_warn "Herokuish builder not supported on $ARCHITECTURE servers."
dokku_log_warn "Switching to pack builder."
BUILDER="pack"
elif [[ "$ARCHITECTURE" == "armhf" ]]; then
dokku_log_warn "Herokuish builder not supported on $ARCHITECTURE servers."
dokku_log_warn "Consider using a Dockerfile to build your app."
return 1
if ! plugn trigger builder-herokuish-allowed "$APP" >/dev/null; then
local ARCHITECTURE="$(dpkg --print-architecture 2>/dev/null || true)"
if [[ "$ARCHITECTURE" == "arm64" ]]; then
dokku_log_warn "Herokuish builder not supported on $ARCHITECTURE servers."
dokku_log_warn "Switching to pack builder."
BUILDER="pack"
elif [[ "$ARCHITECTURE" == "armhf" ]]; then
dokku_log_warn "Herokuish builder not supported on $ARCHITECTURE servers."
dokku_log_warn "Consider using a Dockerfile to build your app."
return 1
fi
fi
fi