Files
dokku/plugins/tar/deploy-source

24 lines
434 B
Plaintext
Raw Normal View History

#!/usr/bin/env bash
set -eo pipefail
[[ $DOKKU_TRACE ]] && set -x
2020-02-10 02:40:59 -05:00
trigger-tar-deploy-source() {
2018-03-03 19:11:49 -05:00
declare desc="tar deploy-source plugin trigger"
2020-02-10 02:40:59 -05:00
declare trigger="deploy-source"
declare APP="$1"
local STDIN
STDIN=$(cat)
2018-03-03 19:11:49 -05:00
# bail if another source is detected
if [[ -n "$STDIN" ]]; then
echo "$STDIN"
return
fi
if [[ -f "$DOKKU_ROOT/$APP/src.tar" ]]; then
echo "tar"
fi
}
2020-02-10 02:40:59 -05:00
trigger-tar-deploy-source "$@"