Unverified Commit 9b9b3ae3 authored by Danny Tuppeny's avatar Danny Tuppeny Committed by GitHub

Retry npm step 5 times with 5 second pause (#18918)

parent 44924e5c
#!/bin/bash #!/bin/bash
set -ex set -ex
function retry {
local total_tries=$1
local remaining_tries=$total_tries
shift
while [ $remaining_tries -gt 0 ]; do
"$@" && break
remaining_tries=$(($remaining_tries - 1))
sleep 5
done
[ $remaining_tries -eq 0 ] && {
echo "Command still failed after $total_tries tries: $@"
return 1
}
return 0
}
if [ -n "$TRAVIS" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then if [ -n "$TRAVIS" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ]; then
gem install coveralls-lcov gem install coveralls-lcov
gem install bundler gem install bundler
npm install -g firebase-tools@">=3.6.1 <3.7.0" retry 5 npm install -g firebase-tools@">=3.6.1 <3.7.0"
fi fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment