Skip to content

Commit

Permalink
ci: fix broken homebrew cache (#27409)
Browse files Browse the repository at this point in the history
Backport of #27224

Co-authored-by: VerteDinde <khammond@slack-corp.com>
  • Loading branch information
trop[bot] and VerteDinde committed Jan 20, 2021
1 parent 5737bac commit 095de81
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -332,15 +332,17 @@ step-setup-goma-for-build: &step-setup-goma-for-build
step-restore-brew-cache: &step-restore-brew-cache
restore_cache:
paths:
- /usr/local/Homebrew
- /usr/local/Cellar/gnu-tar
- /usr/local/bin/gtar
keys:
- v1-brew-cache-{{ arch }}
- v4-brew-cache-{{ arch }}

step-save-brew-cache: &step-save-brew-cache
save_cache:
paths:
- /usr/local/Homebrew
key: v1-brew-cache-{{ arch }}
- /usr/local/Cellar/gnu-tar
- /usr/local/bin/gtar
key: v4-brew-cache-{{ arch }}
name: Persisting brew cache

step-get-more-space-on-mac: &step-get-more-space-on-mac
Expand Down Expand Up @@ -480,8 +482,10 @@ step-install-gnutar-on-mac: &step-install-gnutar-on-mac
name: Install gnu-tar on macos
command: |
if [ "`uname`" == "Darwin" ]; then
brew update
brew install gnu-tar
if [ ! -d /usr/local/Cellar/gnu-tar/ ]; then
brew update
brew install gnu-tar
fi
ln -fs /usr/local/bin/gtar /usr/local/bin/tar
fi
Expand Down Expand Up @@ -1158,7 +1162,6 @@ steps-checkout-and-save-cache: &steps-checkout-and-save-cache
- *step-maybe-early-exit-doc-only-change
- *step-depot-tools-get
- *step-depot-tools-add-to-path
- *step-restore-brew-cache
- *step-get-more-space-on-mac
- *step-install-gnutar-on-mac

Expand Down

0 comments on commit 095de81

Please sign in to comment.