Files
dokku/plugins/git/deploy-method

23 lines
418 B
Bash
Executable File

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