@@ -524,6 +524,21 @@ before_install: |
524
524
source multibuild_customize.sh
525
525
echo $ENABLE_CONTRIB > contrib.enabled
526
526
echo $ENABLE_HEADLESS > headless.enabled
527
+
528
+ if [ -n "$IS_OSX" ]; then
529
+ TAPS="$(brew --repository)/Library/Taps"
530
+ if [ -e "$TAPS/caskroom/homebrew-cask" -a -e "$TAPS/homebrew/homebrew-cask" ]; then
531
+ rm -rf "$TAPS/caskroom/homebrew-cask"
532
+ fi
533
+ find "$TAPS" -type d -name .git -exec \
534
+ bash -xec '
535
+ cd $(dirname '\''{}'\'')
536
+ git clean -fxd
537
+ git status' \;
538
+
539
+ brew_cache_cleanup
540
+ fi
541
+
527
542
before_install
528
543
# Not interested in travis internal scripts' output
529
544
set +x
@@ -552,15 +567,9 @@ before_cache: |
552
567
if [ -n "$IS_OSX" ]; then
553
568
554
569
# When Taps is cached, this dir causes "Error: file exists" on `brew update`
555
- rm -rf "$(brew --repository)/Library/Taps/homebrew/homebrew-cask/homebrew-cask"
556
- find "$(brew --repository)/Library/Taps" -type d -name .git -exec \
557
- bash -xec '
558
- cd $(dirname '\''{}'\'')
559
- git status
560
- # https://stackoverflow.com/questions/8296710/how-to-ignore-xargs-commands-if-stdin-input-is-empty/19038748#19038748
561
- git ls-files --other -z | xargs -0 -n100 git add
562
- git commit -a -m "Travis auto changes"
563
- [[ -n $(git stash list) ]] && git stash drop' \;
570
+ if [ -e "$(brew --repository)/Library/Taps/homebrew/homebrew-cask/homebrew-cask" ]; then
571
+ rm -rf "$(brew --repository)/Library/Taps/homebrew/homebrew-cask/homebrew-cask"
572
+ fi
564
573
565
574
brew_cache_cleanup
566
575
0 commit comments