Files
dokku/plugins/tar/deploy-method
Jose Diaz-Gonzalez c9d9750afe feat: add a new plugin trigger for detecting what the current deployment method is
This is currently used solely for reporting.

Closes #3047
2018-03-03 18:16:50 -05:00

22 lines
413 B
Bash
Executable File

#!/usr/bin/env bash
set -eo pipefail; [[ $DOKKU_TRACE ]] && set -x
tar_deploy_method() {
declare desc="tar deploy-method plugin trigger"
declare trigger="tar_deploy_method"
declare APP="$1"
local STDIN=$(cat)
# bail if another method is detected
if [[ -n "$STDIN" ]]; then
echo "$STDIN"
return
fi
if [[ -f "$DOKKU_ROOT/$APP/src.tar" ]]; then
echo "tar"
fi
}
tar_deploy_method "$@"