feat: call ps_rebuild from post-app-rename-setup
This commit is contained in:
@@ -30,7 +30,6 @@ cmd-apps-rename() {
|
||||
[[ -f "$DOKKU_ROOT/$NEW_APP/URLS" ]] && sed -i -e "s/$OLD_APP/$NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/URLS"
|
||||
[[ -f "$DOKKU_ROOT/$NEW_APP/VHOST" ]] && sed -i -e "s/$OLD_APP/$NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/VHOST"
|
||||
[[ -f "$DOKKU_ROOT/$NEW_APP/hooks/pre-receive" ]] && sed -i -e "s/git-hook $OLD_APP/git-hook $NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/hooks/pre-receive"
|
||||
ps_rebuild "$NEW_APP"
|
||||
plugn trigger post-app-rename "$OLD_APP" "$NEW_APP"
|
||||
docker_cleanup "$OLD_APP" "true"
|
||||
echo "Renaming $OLD_APP to $NEW_APP... done"
|
||||
|
||||
16
plugins/ps/post-app-rename-setup
Executable file
16
plugins/ps/post-app-rename-setup
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/config/functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/ps/functions"
|
||||
|
||||
trigger-ps-post-app-rename-setup() {
|
||||
declare desc="ps post-app-rename-setup plugin trigger"
|
||||
declare trigger="post-app-rename-setup"
|
||||
declare OLD_APP="$1" NEW_APP="$2"
|
||||
|
||||
ps_rebuild "$NEW_APP"
|
||||
}
|
||||
|
||||
trigger-ps-post-app-rename-setup "$@"
|
||||
Reference in New Issue
Block a user