From dd084f58909ea100fc3b27e870a7c89c658508b6 Mon Sep 17 00:00:00 2001 From: checktheroads Date: Tue, 18 Jun 2019 15:09:14 -0700 Subject: [PATCH] simplified script; switched to TRAVIS_BRANCH env variable --- tests/ci_git_prep.sh | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/tests/ci_git_prep.sh b/tests/ci_git_prep.sh index d93da8e..abbf58f 100644 --- a/tests/ci_git_prep.sh +++ b/tests/ci_git_prep.sh @@ -1,22 +1,7 @@ #!/bin/sh -THIS_BRANCH=0 - -git_setup() { - git config --global user.email "travis@travis-ci.org" - git config --global user.name "Travis CI" -} - -set_branch() { - if [ "$TRAVIS_PULL_REQUEST" = "true" ]; then - THIS_BRANCH=$TRAVIS_PULL_REQUEST_BRANCH - else - THIS_BRANCH='master' - fi -} - -git_setup +git config --global user.email "travis@travis-ci.org" +git config --global user.name "Travis CI" git fetch -set_branch -git checkout $THIS_BRANCH +git checkout $TRAVIS_BRANCH exit 0