diff mbox series

[1/1] ci(osx): use new location of the `perforce` cask

Message ID 84830d89eb330f256b3802e0c1b63ff32030ff79.1571160721.git.gitgitgadget@gmail.com (mailing list archive)
State New, archived
Headers show
Series ci: update caskroom/cask/perforce to new location | expand

Commit Message

Johannes Schindelin via GitGitGadget Oct. 15, 2019, 5:32 p.m. UTC
From: Johannes Schindelin <johannes.schindelin@gmx.de>

The CI builds are failing for Mac OS X due to a change in the
location of the perforce cask. The command outputs the following
error:

    + brew install caskroom/cask/perforce
    Error: caskroom/cask was moved. Tap homebrew/cask-cask instead.

Preface the "brew install caskroom/cask/perforce" with the old
way of installing perforce, and only try this method if the
"brew install perforce" fails.

The existing way to use caskroom was added in 672f51cb (travis-ci:
fix Perforce install on macOS, 2017-01-22) and the justification
is that the "brew install perforce" can fail due to a hash
mis-match. The mismatch is due to the official Perforce distro
updating the published binaries without updating the version
string. CI servers are typically fresh virtual machines, so that
issue should not arise in automated builds.

Even if a build server is re-used and hits the hash mis-match,
it will fall back to the "new" mechanism which is currently
failing, but may be fixed independently of this change.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Derrick Stolee <dstolee@microsoft.com>
---
 ci/install-dependencies.sh | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
index 85a9d6b15c..489b5dcf17 100755
--- a/ci/install-dependencies.sh
+++ b/ci/install-dependencies.sh
@@ -40,6 +40,7 @@  osx-clang|osx-gcc)
 	test -z "$BREW_INSTALL_PACKAGES" ||
 	brew install $BREW_INSTALL_PACKAGES
 	brew link --force gettext
+	brew cask install perforce ||
 	brew install caskroom/cask/perforce
 	case "$jobname" in
 	osx-gcc)