feat: add a Railpack builder to Dokku

Closes #7615
This commit is contained in:
Jose Diaz-Gonzalez
2025-09-08 04:28:05 -04:00
parent 837c3db042
commit cba345025c
28 changed files with 682 additions and 2 deletions

View File

@@ -0,0 +1,30 @@
#!/usr/bin/env bash
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/builder-railpack/internal-functions"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
trigger-builder-railpack-core-post-extract() {
declare desc="builder-railpack post-extract plugin trigger"
declare trigger="post-extract"
declare APP="$1" SOURCECODE_WORK_DIR="$2"
local NEW_RAILPACK_JSON="$(fn-builder-railpack-computed-railpackjson-path "$APP")"
pushd "$TMP_WORK_DIR" >/dev/null
if [[ -z "$NEW_RAILPACK_JSON" ]]; then
return
fi
if [[ ! -f "$NEW_RAILPACK_JSON" ]]; then
rm -f railpack.json
return
fi
if [[ "$NEW_RAILPACK_JSON" != "railpack.json" ]]; then
mv "$NEW_RAILPACK_JSON" railpack.json
fi
popd &>/dev/null || pushd "/tmp" >/dev/null
}
trigger-builder-railpack-core-post-extract "$@"