From 95c24738dbd894949fcf09dae8fc2beb2b51b5ab Mon Sep 17 00:00:00 2001 From: Bill Maxwell Date: Fri, 9 Sep 2016 10:51:56 -0700 Subject: [PATCH] Fix the pull request branch issues (#274) --- .drone.yml | 1 - scripts/test | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.drone.yml b/.drone.yml index a641707..81ebe63 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,7 +1,6 @@ --- pipeline: build: - privileged: true image: rancher/dind:v0.6.0 commands: - ./scripts/ci diff --git a/scripts/test b/scripts/test index 77a71aa..864fbd7 100755 --- a/scripts/test +++ b/scripts/test @@ -6,6 +6,10 @@ cd $(dirname $0)/.. trap "rm -rf /scratch/*" exit GIT_BRANCH=$(git rev-parse --abbrev-ref HEAD) +if [ -n "${DRONE_BRANCH}" ]; then + git checkout -b ${DRONE_BRANCH} + GIT_BRANCH=${DRONE_BRANCH} +fi if [ "$GIT_BRANCH" != "master" ]; then sed -i "s#master#$GIT_BRANCH#" ./scripts/repo.json