forked from Homebrew/homebrew-cask
-
Notifications
You must be signed in to change notification settings - Fork 1
/
.travis.yml
51 lines (45 loc) · 1.38 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
language: c
os: osx
osx_image:
- xcode10.1
- xcode10.3
branches:
only:
- master
cache:
directories:
- /usr/local/Homebrew/Library/Homebrew/vendor/bundle
- /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby
install:
- |
# Force strict error checking.
set -o errexit
set -o pipefail
- |
# Update Travis commit range.
# This is not normally required but does prevent problems with outdated forks and
# deleted casks (see https://github.com/Homebrew/homebrew-cask/pull/43164).
BRANCH_COMMIT="${TRAVIS_COMMIT_RANGE##*.}"
TARGET_COMMIT="${TRAVIS_COMMIT_RANGE%%.*}"
if ! MERGE_BASE="$(git merge-base "${BRANCH_COMMIT}" "${TARGET_COMMIT}" 2>/dev/null)"; then
git fetch --unshallow
MERGE_BASE="$(git merge-base "${BRANCH_COMMIT}" "${TARGET_COMMIT}")"
fi
export TRAVIS_COMMIT_RANGE="${MERGE_BASE}...${BRANCH_COMMIT}"
- |
# Switch to master branch.
export HOMEBREW_COLOR=1
export HOMEBREW_DEVELOPER=1
export HOMEBREW_NO_AUTO_UPDATE=1
brew update-reset
HOMEBREW_INSTALL_BUNDLER_GEMS_FIRST=1 brew config
- |
# Mirror the repo as a tap.
TAP_DIR="$(brew --repository "${TRAVIS_REPO_SLUG}")"
mkdir -p "${TAP_DIR}"
rsync -az --delete "${TRAVIS_BUILD_DIR}/" "${TAP_DIR}/"
export TRAVIS_BUILD_DIR="${TAP_DIR}"
builtin cd "${TAP_DIR}"
script: brew cask ci
notifications:
email: false