brew/.travis.yml
Xu Cheng 79f71ca2ef travis: fix Could not parse object TRAVIS_COMMIT
If a PR is edited(e.g. force pushed) during the build.
TRAVIS_COMMIT will be lost. Refetching the merge ref wouldn't
help this situation as well. Since Travis already have reset
$TRAVIS_BUILD_DIR to the commit we need to test, let's use it to
determine TRAVIS_COMMIT directly.

Ref: https://github.com/travis-ci/travis-ci/issues/2666
2015-09-28 21:46:58 +08:00

35 lines
793 B
YAML

# Force OS X.
language: objective-c
matrix:
include:
- env: OSX=10.11
os: osx
osx_image: osx10.11
rvm: system
- env: OSX=10.10
os: osx
osx_image: xcode7
rvm: system
- env: OSX=10.9
os: osx
osx_image: beta-xcode6.2
rvm: system
before_install:
- export TRAVIS_COMMIT=$(git rev-parse --verify -q HEAD)
- cd /usr/local
- 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
- env | grep TRAVIS_
- if [ -f ".git/shallow" ]; then travis_retry git fetch --unshallow; fi
- git reset --hard $TRAVIS_COMMIT
- git clean -qxdff
script:
- brew test-bot
notifications:
email: false