feat: call clone/destroy prop commands as necessary

This commit is contained in:
Jose Diaz-Gonzalez
2020-02-17 19:08:39 -05:00
parent d336d7c5c2
commit 63f4ec3867
18 changed files with 134 additions and 13 deletions

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
trigger-git-post-app-clone-setup() {
declare desc="modifies git-hook"
@@ -10,6 +11,8 @@ trigger-git-post-app-clone-setup() {
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"
}
trigger-git-post-app-clone-setup "$@"

View File

@@ -1,6 +1,7 @@
#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
trigger-git-post-app-rename-setup() {
declare desc="modifies git-hook"
@@ -10,6 +11,9 @@ trigger-git-post-app-rename-setup() {
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 "$@"