Fix the pull request branch issues (#274)

This commit is contained in:
Bill Maxwell 2016-09-09 10:51:56 -07:00 committed by GitHub
parent 31b91bc31a
commit 95c24738db
2 changed files with 4 additions and 1 deletions

View File

@ -1,7 +1,6 @@
---
pipeline:
build:
privileged: true
image: rancher/dind:v0.6.0
commands:
- ./scripts/ci

View File

@ -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