summaryrefslogtreecommitdiff
path: root/ci/install-dependencies.sh
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2019-10-23 00:19:38 (GMT)
committerJunio C Hamano <gitster@pobox.com>2019-10-23 02:46:41 (GMT)
commit0eb3671ed96f74b79e54a1101746882bafe50070 (patch)
tree5de9c09ba2eaf52fff761084855b95d3d3a454a2 /ci/install-dependencies.sh
parent108b97dc372828f0e72e56bbb40cae8e1e83ece6 (diff)
downloadgit-0eb3671ed96f74b79e54a1101746882bafe50070.zip
git-0eb3671ed96f74b79e54a1101746882bafe50070.tar.gz
git-0eb3671ed96f74b79e54a1101746882bafe50070.tar.bz2
ci(osx): use new location of the `perforce` cask
The Azure Pipelines builds are failing for macOS 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. So let's try to call `brew cask install perforce` first (which is what that error message suggests, in a most round-about way). Prior to 672f51cb we used to install the 'perforce' package with 'brew install perforce' (note: no 'cask' in there). The justification for 672f51cb was that the command 'brew install perforce' simply stopped working, after Homebrew folks decided that it's better to move the 'perforce' package to a "cask". Their justification for this move was that 'brew install perforce' "can fail due to a checksum mismatch ...", and casks can be installed without checksum verification. And indeed, both 'brew cask install perforce' and 'brew install caskroom/cask/perforce' printed something along the lines of: ==> No checksum defined for Cask perforce, skipping verification It is unclear why 672f51cb used 'brew install caskroom/cask/perforce' instead of 'brew cask install perforce'. It appears (by running both commands on old Travis CI macOS images) that both commands worked all the same already back then. In any case, as the error message at the top of this commit message shows, 'brew install caskroom/cask/perforce' has stopped working recently, but 'brew cask install perforce' still does, so let's use that. CI servers are typically fresh virtual machines, but not always. To accommodate for that, let's try harder if `brew cask install perforce` fails, by specifically pulling the latest `master` of the `homebrew-cask` repository. This will still fail, of course, when `homebrew-cask` falls behind Perforce's release schedule. But once it is updated, we can now simply re-run the failed jobs and they will pick up that update. As for updating `homebrew-cask`: the beginnings of automating this in https://dev.azure.com/gitgitgadget/git/_build?definitionId=11&_a=summary will be finished once the next Perforce upgrade comes around. Helped-by: SZEDER Gábor <szeder.dev@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Derrick Stolee <dstolee@microsoft.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'ci/install-dependencies.sh')
-rwxr-xr-xci/install-dependencies.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/ci/install-dependencies.sh b/ci/install-dependencies.sh
index 85a9d6b..ce149ed 100755
--- a/ci/install-dependencies.sh
+++ b/ci/install-dependencies.sh
@@ -40,6 +40,11 @@ osx-clang|osx-gcc)
test -z "$BREW_INSTALL_PACKAGES" ||
brew install $BREW_INSTALL_PACKAGES
brew link --force gettext
+ brew cask install perforce || {
+ # Update the definitions and try again
+ git -C "$(brew --repository)"/Library/Taps/homebrew/homebrew-cask pull &&
+ brew cask install perforce
+ } ||
brew install caskroom/cask/perforce
case "$jobname" in
osx-gcc)