Merge pull request #32 from shubham149/clone_branch

Support cloning a branch without commit ID
This commit is contained in:
Brad Rydzewski 2020-10-29 10:11:23 -04:00 committed by GitHub
commit d0bca2a1f7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,6 +23,14 @@ if [[ -z "${DRONE_COMMIT_BRANCH}" ]]; then
exit 0
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 -x