Support cloning a branch without commit
This commit is contained in:
parent
1cc29870a1
commit
dd96a5a670
@ -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