2021-07-10 01:56:37 -04:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
|
|
|
|
source "$PLUGIN_AVAILABLE_PATH/builder-pack/internal-functions"
|
|
|
|
|
set -eo pipefail
|
|
|
|
|
[[ $DOKKU_TRACE ]] && set -x
|
|
|
|
|
|
|
|
|
|
trigger-builder-pack-core-post-extract() {
|
|
|
|
|
declare desc="builder-pack post-extract plugin trigger"
|
|
|
|
|
declare trigger="post-extract"
|
|
|
|
|
declare APP="$1" SOURCECODE_WORK_DIR="$2"
|
|
|
|
|
local NEW_PROJECT_TOML="$(fn-builder-pack-computed-projecttoml-path "$APP")"
|
|
|
|
|
|
|
|
|
|
pushd "$TMP_WORK_DIR" >/dev/null
|
|
|
|
|
|
|
|
|
|
if [[ -z "$NEW_PROJECT_TOML" ]]; then
|
|
|
|
|
return
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [[ ! -f "$NEW_PROJECT_TOML" ]]; then
|
|
|
|
|
rm -f project.toml
|
|
|
|
|
return
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
if [[ "$NEW_PROJECT_TOML" != "project.toml" ]]; then
|
|
|
|
|
mv "$NEW_PROJECT_TOML" project.toml
|
|
|
|
|
fi
|
2022-01-27 22:14:14 -05:00
|
|
|
popd &>/dev/null || pushd "/tmp" >/dev/null
|
2021-07-10 01:56:37 -04:00
|
|
|
}
|
|
|
|
|
|
2021-07-10 02:11:54 -04:00
|
|
|
trigger-builder-pack-core-post-extract "$@"
|