Support cloning a branch without commit

This commit is contained in:
Shubham Agrawal 2020-10-29 16:07:40 +05:30
parent 1cc29870a1
commit dd96a5a670

View File

@ -23,6 +23,14 @@ if [[ -z "${DRONE_COMMIT_BRANCH}" ]]; then
exit 0 exit 0
fi fi
if [[ -z "${DRONE_COMMIT_SHA}" ]]; then
set -e
set -x
git fetch ${FLAGS} origin +refs/heads/${DRONE_COMMIT_BRANCH}:
git checkout -b ${DRONE_COMMIT_BRANCH}
exit 0
fi
set -e set -e
set -x set -x