Merge pull request #32 from shubham149/clone_branch
Support cloning a branch without commit ID
This commit is contained in:
commit
d0bca2a1f7
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user