Files
dokku/plugins/builder-herokuish/builder-detect
Jose Diaz-Gonzalez 76a979e139 chore: remove ARM support
Building/testing for ARM does not happen often - the only runtime environment is Raspberry PI, which supports ARM64 - and complicates support for a ton of features. Aside from that, CI runs are much longer for ARM Dokku images, often reaching 15-20 minutes or just timing out completely.

Rather than support an architecture that doesn't have much usage by maintainers and has a lot of maintenance burden, we're removing the platform.
2023-10-15 20:25:09 -04:00

34 lines
904 B
Bash
Executable File

#!/usr/bin/env bash
source "$PLUGIN_AVAILABLE_PATH/builder-herokuish/functions"
source "$PLUGIN_AVAILABLE_PATH/builder-herokuish/internal-functions"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
trigger-builder-herokuish-builder-detect() {
declare desc="builder-herokuish builder-detect plugin trigger"
declare trigger="builder-detect"
declare APP="$1" SOURCECODE_WORK_DIR="$2"
local ARCHITECTURE="$(dpkg --print-architecture 2>/dev/null || true)"
if [[ "$ARCHITECTURE" == "arm64" ]] && [[ "$(fn-builder-herokuish-computed-allowed "$APP")" != "true" ]]; then
return
fi
if fn-has-buildpacks-file "$SOURCECODE_WORK_DIR"; then
echo "herokuish"
return
fi
if fn-has-buildpack-dotenv "$SOURCECODE_WORK_DIR"; then
echo "herokuish"
return
fi
if fn-has-buildpack-env "$APP"; then
echo "herokuish"
return
fi
}
trigger-builder-herokuish-builder-detect "$@"