From 6c373d89ec776f9521ae6ca3a39870224d4ffd74 Mon Sep 17 00:00:00 2001 From: "Stephen M. Coakley" Date: Wed, 15 Jun 2016 12:47:39 -0500 Subject: [PATCH] Fix Travis integration (#349) --- .travis.yml | 5 ----- tools/travis-github-pr-integration.sh | 6 +++++- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 407f435..868507e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,11 +16,6 @@ addons: - libncurses5-dev - tree -env: - global: - - OMF_REPO_URI="https://github.com/$TRAVIS_REPO_SLUG" - - OMF_REPO_BRANCH="$TRAVIS_BRANCH" - before_install: - source tools/travis-github-pr-integration.sh - tools/travis-install-fish.sh diff --git a/tools/travis-github-pr-integration.sh b/tools/travis-github-pr-integration.sh index fb0ac36..54ab535 100755 --- a/tools/travis-github-pr-integration.sh +++ b/tools/travis-github-pr-integration.sh @@ -1,5 +1,9 @@ # Return if we are not in a Pull Request -[[ "$TRAVIS_PULL_REQUEST" = "false" ]] && return +if [[ "$TRAVIS_PULL_REQUEST" = "false" ]]; then + export OMF_REPO_URI="https://github.com/$TRAVIS_REPO_SLUG" + export OMF_REPO_BRANCH="$TRAVIS_BRANCH" + return +fi GITHUB_PR_URL=https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST GITHUB_PR_BODY=$(curl -s $GITHUB_PR_URL 2>/dev/null)