travis-ci: fix Perforce install on macOS

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] https://github.com/caskroom/homebrew-cask/pull/29180 [4] https://caskroom.github.io/ Signed-off-by: Lars Schneider <larsxschneider@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Lars Schneider committed Jan 22, 2017 at 23:55 UTC 672f51cb83300d1feba8fb00b19afa3b335b2106
1 file changed +2 -10
.travis.yml
+2 -10
@@ -75,20 +75,12 @@ before_install:
75 popd
76 ;;
77 osx)
78 - brew_force_set_latest_binary_hash () {
79 - FORMULA=$1
80 - SHA=$(brew fetch --force $FORMULA 2>&1 | grep ^SHA256: | cut -d ' ' -f 2)
81 - sed -E -i.bak "s/sha256 \"[0-9a-f]{64}\"/sha256 \"$SHA\"/g" \
82 - "$(brew --repository homebrew/homebrew-binary)/$FORMULA.rb"
83 - }
78 brew update --quiet
85 - brew tap homebrew/binary --quiet
86 - brew_force_set_latest_binary_hash perforce
87 - brew_force_set_latest_binary_hash perforce-server
79 # Uncomment this if you want to run perf tests:
80 # brew install gnu-time
90 - brew install git-lfs perforce-server perforce gettext
81 + brew install git-lfs gettext
82 brew link --force gettext
83 + brew install caskroom/cask/perforce
84 ;;
85 esac;
86 echo "$(tput setaf 6)Perforce Server Version$(tput sgr0)";