From 0014fd5f1452844ef74f33fc2d0a3a7063459e1c Mon Sep 17 00:00:00 2001 From: Joachim Hill-Grannec Date: Sat, 10 Nov 2018 16:02:31 -0500 Subject: [PATCH] Adding check of refs to handle promotions of tags --- posix/clone | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/posix/clone b/posix/clone index 11f88fd..8f9af81 100755 --- a/posix/clone +++ b/posix/clone @@ -43,7 +43,12 @@ export GIT_COMMITTER_EMAIL=${GIT_AUTHOR_EMAIL} # TODO we should ultimately look at the ref, since # we need something compatible with deployment events. -case $DRONE_BUILD_EVENT in +CLONE_TYPE=$DRONE_BUILD_EVENT +case $DRONE_COMMIT_REF in + refs/tags/* ) CLONE_TYPE=tag ;; +esac + +case $CLONE_TYPE in pull_request) clone-pull-request ;;