File tree 2 files changed +11
-8
lines changed
2 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -619,7 +619,7 @@ script: |
619
619
620
620
before_cache : |
621
621
# Cleanup dirs to be cached
622
- set -x
622
+ set -e; set - x
623
623
if [ -n "$IS_OSX" ]; then
624
624
625
625
# When Taps is cached, this dir causes "Error: file exists" on `brew update`
@@ -630,7 +630,7 @@ before_cache: |
630
630
brew_cache_cleanup
631
631
632
632
fi
633
- set +x
633
+ set +x; set +e
634
634
635
635
after_success : |
636
636
# Upload wheels to pypi if requested
Original file line number Diff line number Diff line change @@ -41,6 +41,12 @@ function brew_install_and_cache_within_time_limit {
41
41
42
42
local BUILD_FROM_SOURCE INCLUDE_BUILD
43
43
44
+ if brew list --versions " $PACKAGE " && ! (brew outdated | grep -qx " $PACKAGE " ); then
45
+ echo " Already installed and the latest version: $PACKAGE "
46
+ return 0
47
+ fi
48
+
49
+
44
50
_brew_is_bottle_available " $PACKAGE " || BUILD_FROM_SOURCE=1
45
51
[ -n " $BUILD_FROM_SOURCE " ] && INCLUDE_BUILD=" --include-build" || true
46
52
@@ -152,7 +158,7 @@ function brew_add_local_bottles {
152
158
)
153
159
fi
154
160
155
- if [ -n " $BOTTLE " ]; then rm " $BOTTLE " ; fi
161
+ if [ -n " $BOTTLE " -a -n " $BOTTLE_EXISTS " ]; then rm " $BOTTLE " ; fi
156
162
rm -f " $BOTTLE_LINK "
157
163
rm " $JSON "
158
164
@@ -295,17 +301,14 @@ function _brew_is_bottle_available {
295
301
296
302
function _brew_install_and_cache {
297
303
# Install bottle or make and cache bottle.
298
- # assumes that deps were already installed.
304
+ # assumes that deps were already installed
305
+ # and not already the latest version
299
306
300
307
local PACKAGE; PACKAGE=" ${1:? } "
301
308
local USE_BOTTLE; USE_BOTTLE=" ${2:? } "
302
309
local VERB
303
310
304
311
if brew list --versions " $PACKAGE " ; then
305
- if ! (brew outdated | grep -qx " $PACKAGE " ); then
306
- echo " Already the latest version: $PACKAGE "
307
- return 0
308
- fi
309
312
VERB=upgrade
310
313
else
311
314
VERB=install
You can’t perform that action at this time.
0 commit comments