refactor to explicitly set IMAGE via get_app_image_name()
This commit is contained in:
@@ -21,7 +21,8 @@ case "$1" in
|
||||
[[ -z $2 ]] && echo "Please specify an app to run the command on" && exit 1
|
||||
[[ "$2" == "tls" ]] && echo "Unable to destroy tls directory" && exit 1
|
||||
[[ "$3" == "force" ]] && DOKKU_APPS_FORCE_DELETE=1
|
||||
APP="$2"; verify_app_name "$APP"
|
||||
APP="$2"; IMAGE_TAG=$(get_running_image_tag $APP)
|
||||
verify_app_name "$APP"
|
||||
|
||||
if [[ -z "$DOKKU_APPS_FORCE_DELETE" ]]; then
|
||||
dokku_log_warn "WARNING: Potentially Destructive Action"
|
||||
@@ -38,7 +39,7 @@ case "$1" in
|
||||
|
||||
echo "Destroying $APP (including all add-ons)"
|
||||
|
||||
pluginhook pre-delete $APP
|
||||
pluginhook pre-delete $APP $IMAGE_TAG
|
||||
DOKKU_APP_CIDS=$(get_app_container_ids $APP)
|
||||
if [[ -n $DOKKU_APP_CIDS ]]; then
|
||||
for ID in $DOKKU_APP_CIDS;do
|
||||
@@ -47,7 +48,7 @@ case "$1" in
|
||||
done
|
||||
fi
|
||||
|
||||
pluginhook post-delete $APP
|
||||
pluginhook post-delete $APP $IMAGE_TAG
|
||||
;;
|
||||
|
||||
help | apps:help)
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
|
||||
source "$(dirname $0)/../common/functions"
|
||||
|
||||
APP="$1"; CACHE_DIR="$DOKKU_ROOT/$APP/cache"
|
||||
APP="$1"; IMAGE_TAG="$2"; IMAGE=$(get_app_image_name $APP $IMAGE_TAG); CACHE_DIR="$DOKKU_ROOT/$APP/cache"
|
||||
verify_app_name "$APP"
|
||||
|
||||
if [[ -d $CACHE_DIR ]]; then
|
||||
|
||||
Reference in New Issue
Block a user