Skip to content

Commit

Permalink
travis.yml: try to refetch PR commit if missing.
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeMcQuaid committed Sep 25, 2015
1 parent afff98d commit 5a11970
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ matrix:
rvm: system

before_install:
- sudo rm -rf /usr/local/.git
- sudo rm -rf /usr/local/.git/refs /usr/local/.git/packed-refs
- sudo rsync -az "$TRAVIS_BUILD_DIR/" /usr/local/
- export TRAVIS_BUILD_DIR="/usr/local"
- sudo chown -R $USER /usr/local
- cd /usr/local
- env | grep TRAVIS_
- if [ -f ".git/shallow" ]; then travis_retry git fetch --unshallow; fi
- git reset --hard $TRAVIS_COMMIT
- if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then git reset --hard $TRAVIS_COMMIT || travis_retry git fetch origin +refs/pull/$TRAVIS_PULL_REQUEST/merge:; fi
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then git reset --hard $TRAVIS_COMMIT; fi
- git clean -qxdff

script:
Expand Down

0 comments on commit 5a11970

Please sign in to comment.