Files
dokku/plugins/builder-herokuish/builder-detect
Jose Diaz-Gonzalez b146483940 fix: skip herokuish version in report output and disable the herokuish builder on armhf architectures
We don't skip pack as in theory they may be able to support arm in the future. Dockerfile builds should work fine, as long as all images in the FROM directives have arm versions.
Finally, the null builder _should_ always work, but of course YMMV :D
2021-10-28 10:07:18 -04:00

32 lines
729 B
Bash
Executable File

#!/usr/bin/env bash
source "$PLUGIN_AVAILABLE_PATH/builder-herokuish/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"
if [[ "$(dpkg --print-architecture 2>/dev/null || true)" == "armhf" ]]; 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 "$@"