Skip to content

Commit

Permalink
Merge pull request #1 from tomato42/travis-fixes-2
Browse files Browse the repository at this point in the history
Fix travis builds
  • Loading branch information
tomato42 committed May 28, 2015
2 parents ba15221 + a0b5b19 commit 412aba4
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,21 @@ matrix:
env: PYCRYPTO=true GMPY=true

before_install:
- |
echo -e "TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST\n" \
"TRAVIS_REPO_SLUG=$TRAVIS_REPO_SLUG\n" \
"TRAVIS_PULL_REQUEST=$TRAVIS_PULL_REQUEST\n" \
"TRAVIS_COMMIT=$TRAVIS_COMMIT\n" \
"TRAVIS_PYTHON_VERSION=$TRAVIS_PYTHON_VERSION"
- |
# workaround https://github.com/travis-ci/travis-ci/issues/2666
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
PR_FIRST=$(curl -s https://github.com/${TRAVIS_REPO_SLUG}/pull/${TRAVIS_PULL_REQUEST}.patch | head -1 | grep -o -E '\b[0-9a-f]{40}\b' | tr -d '\n')
URL="https://github.com/${TRAVIS_REPO_SLUG}/pull/${TRAVIS_PULL_REQUEST}.patch"
# `--location` makes curl follow redirects
PR_FIRST=$(curl --silent --show-error --location $URL | head -1 | grep -o -E '\b[0-9a-f]{40}\b' | tr -d '\n')
TRAVIS_COMMIT_RANGE=$PR_FIRST^..$TRAVIS_COMMIT
fi
- echo "TRAVIS_COMMIT_RANGE=$TRAVIS_COMMIT_RANGE"
- git fetch origin master:refs/remotes/origin/master

install:
Expand Down

0 comments on commit 412aba4

Please sign in to comment.