Skip to content

Commit

Permalink
portect against null generated branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
mihaidma committed Aug 22, 2016
1 parent 03fe52d commit 3ba6923
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .travis.yml
Expand Up @@ -5,6 +5,7 @@ node_js:
- '4'
- '6'

env:
matrix:
- TEST_SUITE=senecajs/seneca
- TEST_SUITE=senecajs/gate-executor
Expand All @@ -15,11 +16,12 @@ node_js:
before_script:
- export PR=https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo `curl -s $PR | jq -r .head.ref`; fi)
- if [ "null" == "$BRANCH" ]; then BRANCH=""; else BRANCH="#$BRANCH"; fi
- echo "TRAVIS_BRANCH=$TRAVIS_BRANCH, PR=$PR, BRANCH=$BRANCH"
- TEST_SUITE_FOLDER=$(basename $TEST_SUITE)
- echo "TEST_SUITE:$TEST_SUITE"
- echo "TEST_SUITE_FOLDER:$TEST_SUITE_FOLDER"
- SENECA_INSTALL=https://github.com/senecajs/seneca#$BRANCH;
- SENECA_INSTALL=https://github.com/senecajs/seneca$BRANCH;
- echo "SENECA_INSTALL:$SENECA_INSTALL";
- if [ $TEST_SUITE_FOLDER != 'seneca' ]; then
git clone https://github.com/$TEST_SUITE;
Expand Down

0 comments on commit 3ba6923

Please sign in to comment.