#!/usr/bin/env bash
source "$PLUGIN_CORE_AVAILABLE_PATH/common/property-functions"
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x

trigger-builder-lambda-post-delete() {
  declare desc="destroys the builder-lambda properties for a given app"
  declare trigger="post-delete"
  declare APP="$1"

  fn-plugin-property-destroy "builder-lambda" "$APP"
  rm -rf "${DOKKU_LIB_ROOT}/data/builder-lambda/$APP"
}

trigger-builder-lambda-post-delete "$@"
