mirror of
https://github.com/dokku/dokku.git
synced 2025-12-25 16:29:30 +01:00
20 lines
589 B
Bash
Executable File
20 lines
589 B
Bash
Executable File
#!/usr/bin/env bash
|
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
|
set -eo pipefail
|
|
[[ $DOKKU_TRACE ]] && set -x
|
|
|
|
trigger-git-post-app-rename-setup() {
|
|
declare desc="modifies git-hook"
|
|
declare trigger="post-app-rename-setup"
|
|
declare OLD_APP="$1" NEW_APP="$2"
|
|
|
|
if [[ -f "$DOKKU_ROOT/$NEW_APP/hooks/pre-receive" ]]; then
|
|
sed -i -e "s/git-hook $OLD_APP/git-hook $NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/hooks/pre-receive"
|
|
fi
|
|
|
|
fn-plugin-property-clone "git" "$OLD_APP" "$NEW_APP"
|
|
fn-plugin-property-destroy "git" "$OLD_APP"
|
|
}
|
|
|
|
trigger-git-post-app-rename-setup "$@"
|