refactor: use fn-git-create-hook
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/git/internal-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
@@ -14,9 +15,7 @@ trigger-git-post-app-clone-setup() {
|
||||
find ./* \( -name ".cache" -o -name "cache" -o -name "VHOST" -o -name "URLS" \) -prune -o -print | cpio -pdmu --quiet "$DOKKU_ROOT/$NEW_APP"
|
||||
popd &>/dev/null || pushd "/tmp" >/dev/null
|
||||
|
||||
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-git-create-hook "$NEW_APP"
|
||||
}
|
||||
|
||||
trigger-git-post-app-clone-setup "$@"
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
#!/usr/bin/env bash
|
||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||
source "$PLUGIN_AVAILABLE_PATH/git/internal-functions"
|
||||
set -eo pipefail
|
||||
[[ $DOKKU_TRACE ]] && set -x
|
||||
|
||||
@@ -15,9 +16,7 @@ trigger-git-post-app-rename-setup() {
|
||||
find ./* \( -name ".cache" -o -name "cache" -o -name "VHOST" -o -name "URLS" \) -prune -o -print | cpio -pdmu --quiet "$DOKKU_ROOT/$NEW_APP"
|
||||
popd &>/dev/null || pushd "/tmp" >/dev/null
|
||||
|
||||
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-git-create-hook "$NEW_APP"
|
||||
}
|
||||
|
||||
trigger-git-post-app-rename-setup "$@"
|
||||
|
||||
Reference in New Issue
Block a user