Files
dokku/plugins/git/post-delete
Jose Diaz-Gonzalez 10468ce47d fix: ensure we cleanup the data directory on app deletion
Also use a variable for the clone root dir.
2024-03-13 05:37:06 -04:00

17 lines
427 B
Bash
Executable File

#!/usr/bin/env bash
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
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 "$@"