这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions plugins/git/internal-functions
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,12 @@ cmd-git-sync() {

verify_app_name "$APP"

if [[ -d "$DOKKU_LIB_ROOT/data/git/$APP" ]]; then
local APP_CLONE_ROOT="$DOKKU_LIB_ROOT/data/git/$APP"

if [[ -d "$APP_CLONE_ROOT" ]]; then
if has_tty eq 0; then
cmd-git-unlock "$APP"
if [[ -d "$DOKKU_LIB_ROOT/data/git/$APP" ]]; then
if [[ -d "$APP_CLONE_ROOT" ]]; then
dokku_log_fail "Failed to delete existing clone folder"
exit 15
fi
Expand Down Expand Up @@ -266,6 +268,7 @@ cmd-git-unlock() {
dokku_log_info1 "No clone folder exists app already unlocked"
fi
}

cmd-git-public-key() {
declare desc="outputs the dokku public deploy key"
local cmd="git:public-key"
Expand Down
2 changes: 2 additions & 0 deletions plugins/git/post-delete
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ trigger-git-post-delete() {
declare desc="destroys the git properties for a given app"
declare trigger="post-delete"
declare APP="$1"
local APP_CLONE_ROOT="$DOKKU_LIB_ROOT/data/git/$APP"

fn-plugin-property-destroy "git" "$APP"
rm -rf "$APP_CLONE_ROOT"
}

trigger-git-post-delete "$@"