fix: cleanup docker options during post-delete

While the directory removal should be enough, we should also force-clean just to be sure.
This commit is contained in:
Jose Diaz-Gonzalez
2020-12-01 22:38:20 -05:00
parent 3de8c3002a
commit 168ed1716c

View File

@@ -0,0 +1,13 @@
#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
trigger-docker-options-post-delete() {
declare desc="deletes docker options files for an app"
declare trigger="post-delete"
declare APP="$1"
rm -f "$(fn-get-phase-file-path "$APP" "build")" "$(fn-get-phase-file-path "$APP" "deploy")" "$(fn-get-phase-file-path "$APP" "run")"
}
trigger-docker-options-post-delete "$@"