From 855af340f70bdca8cc3d3dabfc1bbbe8b13b299c Mon Sep 17 00:00:00 2001 From: Bill Maxwell Date: Fri, 9 Sep 2016 12:50:32 -0700 Subject: [PATCH] Fix branch already exists in drone (#276) --- scripts/test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test b/scripts/test index 864fbd7..c40bba3 100755 --- a/scripts/test +++ b/scripts/test @@ -6,7 +6,7 @@ cd $(dirname $0)/.. trap "rm -rf /scratch/*" exit GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) -if [ -n "${DRONE_BRANCH}" ]; then +if [ -n "${DRONE_BRANCH}" ] && [ "${DRONE_BRANCH}" != "${GIT_BRANCH}" ]; then git checkout -b ${DRONE_BRANCH} GIT_BRANCH=${DRONE_BRANCH} fi