Skip to content

Commit

Permalink
Merge pull request #105 from AbsaOSS/ci/ios-retry-brew-update
Browse files Browse the repository at this point in the history
If brew update fails, try once more
  • Loading branch information
mirgee authored Sep 24, 2020
2 parents b7fa065 + d6adab3 commit c12df6d
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion wrappers/ios/ci/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,19 @@ setup() {

echo "Update Homebrew"
# brew doctor || 1
brew update

tries=0
threshold=5
while ! brew update;
do
tries=$(( $tries + 1 ))
echo echo "Brew update attempt ${tries}/${threshold} failed.";
if [ "$tries" -eq "${threshold}" ]; then
echo "Failed to update brew after ${threshold} attempts. Terminating."
exit 1
fi;
sleep 5;
done

echo "Install required native libraries and utilities"
which pkg-config &>/dev/null || brew install pkg-config
Expand Down

0 comments on commit c12df6d

Please sign in to comment.