forked from Homebrew/homebrew-cask-fonts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
executable file
Β·54 lines (47 loc) Β· 1.4 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
52
53
54
language: ruby
sudo: true
matrix:
include:
- os: osx
osx_image: xcode10
rvm: system
fast_finish: true
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
- |
# Mirror the repo as a tap.
TAP_DIR="$(brew --repository)/Library/Taps/${TRAVIS_REPO_SLUG}"
mkdir -p "${TAP_DIR}"
rsync -az --delete "${TRAVIS_BUILD_DIR}/" "${TAP_DIR}/"
export TRAVIS_BUILD_DIR="${TAP_DIR}"
builtin cd "${TRAVIS_BUILD_DIR}"
script: brew cask ci
notifications:
email: false