2025-09-08 04:28:05 -04:00
|
|
|
#!/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")"
|
|
|
|
|
|
2026-05-07 12:39:46 -04:00
|
|
|
pushd "$SOURCECODE_WORK_DIR" >/dev/null
|
2025-09-08 04:28:05 -04:00
|
|
|
|
|
|
|
|
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 "$@"
|