refactor: use fn-git-create-hook
This commit is contained in:
2 files changed
+4
-6
No files matched your search
@@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||||
|
source "$PLUGIN_AVAILABLE_PATH/git/internal-functions"
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
[[ $DOKKU_TRACE ]] && set -x
|
[[ $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"
|
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
|
popd &>/dev/null || pushd "/tmp" >/dev/null
|
||||||
|
|
||||||
if [[ -f "$DOKKU_ROOT/$NEW_APP/hooks/pre-receive" ]]; then
|
fn-git-create-hook "$NEW_APP"
|
||||||
sed -i -e "s/git-hook $OLD_APP/git-hook $NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/hooks/pre-receive"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
trigger-git-post-app-clone-setup "$@"
|
trigger-git-post-app-clone-setup "$@"
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
|
||||||
|
source "$PLUGIN_AVAILABLE_PATH/git/internal-functions"
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
[[ $DOKKU_TRACE ]] && set -x
|
[[ $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"
|
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
|
popd &>/dev/null || pushd "/tmp" >/dev/null
|
||||||
|
|
||||||
if [[ -f "$DOKKU_ROOT/$NEW_APP/hooks/pre-receive" ]]; then
|
fn-git-create-hook "$NEW_APP"
|
||||||
sed -i -e "s/git-hook $OLD_APP/git-hook $NEW_APP/g" "$DOKKU_ROOT/$NEW_APP/hooks/pre-receive"
|
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
trigger-git-post-app-rename-setup "$@"
|
trigger-git-post-app-rename-setup "$@"
|
||||||
Reference in new issue
Block a user