brew/.travis.yml
Mike McQuaid df0abe08b2 travis.yml: only build the master branch.
This avoid two weird things:

- scary messages when building tags fails
- two builds being run instead of one when people create a PR and a
  branch on the Homebrew/brew repo (rather than their fork).
2017-08-05 17:09:32 +01:00

45 lines
1.3 KiB
YAML

language: ruby
cache:
directories:
- $HOME/.gem/ruby
- $HOME/Library/Caches/Homebrew/style
- $HOME/Library/Caches/Homebrew/tests
branches:
only:
- master
matrix:
fast_finish: true
include:
- os: osx
osx_image: xcode8.3
rvm: system
- os: linux
sudo: false
rvm: 2.0.0
before_install:
- export HOMEBREW_NO_AUTO_UPDATE=1
- export HOMEBREW_DEVELOPER=1
- git clone --depth=1 https://github.com/Homebrew/homebrew-test-bot Library/Taps/homebrew/homebrew-test-bot
- if [ "${TRAVIS_OS_NAME}" = "osx" ]; then
HOMEBREW_REPOSITORY="$(brew --repo)";
sudo chown -R "$USER" "$HOMEBREW_REPOSITORY/Library/Taps";
mv "$HOMEBREW_REPOSITORY/Library/Taps" "$PWD/Library";
sudo rm -rf "$HOMEBREW_REPOSITORY";
sudo ln -s "$PWD" "$HOMEBREW_REPOSITORY";
else
git fetch --unshallow;
export PATH="$PWD/bin:$PATH";
HOMEBREW_CORE_TAP_DIR="$(brew --repo "homebrew/core")";
mkdir -p "$HOMEBREW_CORE_TAP_DIR";
HOMEBREW_TEST_BOT_TAP_DIR="$(brew --repo "homebrew/test-bot")";
ln -s "$HOMEBREW_TEST_BOT_TAP_DIR/.git" "$HOMEBREW_TEST_BOT_TAP_DIR/Formula" "$HOMEBREW_CORE_TAP_DIR";
umask 022;
fi
script:
- brew test-bot
notifications:
slack: machomebrew:1XNF7p1JRCdBUuKaeSwsWEc1