Skip to content

Commit

Permalink
travis-ci: fix Perforce install on macOS
Browse files Browse the repository at this point in the history
The `perforce` and `perforce-server` package were moved from brew [1][2]
to cask [3]. Teach TravisCI the new location.

Perforce updates their binaries without version bumps. That made the
brew install (legitimately!) fail due to checksum mismatches. The
workaround is not necessary anymore as Cask [4] allows to disable the
checksum test for individual formulas.

[1] https://github.com/Homebrew/homebrew-binary/commit/1394e42de04d07445f82f9512627e864ff4ca4c6
[2] https://github.com/Homebrew/homebrew-binary/commit/f8da22d6b8dbcfcfdb2dfa9ac1a5e5d8e05aac2b
[3] Homebrew/homebrew-cask#29180
[4] https://caskroom.github.io/

Signed-off-by: Lars Schneider <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>
  • Loading branch information
larsxschneider authored and gitster committed Jan 23, 2017
1 parent ad36dc8 commit 672f51c
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,20 +75,12 @@ before_install:
popd
;;
osx)
brew_force_set_latest_binary_hash () {
FORMULA=$1
SHA=$(brew fetch --force $FORMULA 2>&1 | grep ^SHA256: | cut -d ' ' -f 2)
sed -E -i.bak "s/sha256 \"[0-9a-f]{64}\"/sha256 \"$SHA\"/g" \
"$(brew --repository homebrew/homebrew-binary)/$FORMULA.rb"
}
brew update --quiet
brew tap homebrew/binary --quiet
brew_force_set_latest_binary_hash perforce
brew_force_set_latest_binary_hash perforce-server
# Uncomment this if you want to run perf tests:
# brew install gnu-time
brew install git-lfs perforce-server perforce gettext
brew install git-lfs gettext
brew link --force gettext
brew install caskroom/cask/perforce
;;
esac;
echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)";
Expand Down

0 comments on commit 672f51c

Please sign in to comment.