diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2019-08-12 14:35:49 +0900 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2019-08-12 14:37:26 +0900 |
commit | b1ef14176b3716e3900672a9563b94aa3abedb2d (patch) | |
tree | b4901a6a9f550cd3105294b7d96b4c0439729d68 /tool/travis_retry.sh | |
parent | 4f10a61eaaf5bfe7e4c53edc79c5e27a7bd1ae33 (diff) | |
download | ruby-b1ef14176b3716e3900672a9563b94aa3abedb2d.tar.gz |
We did not have tool/ before checkout
anyway we don't need authorization here.
Also retry does not seem to work in the original version, so let's
extend this with retries as a separate github action later.
Diffstat (limited to 'tool/travis_retry.sh')
-rwxr-xr-x | tool/travis_retry.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tool/travis_retry.sh b/tool/travis_retry.sh new file mode 100755 index 0000000000..9b79c56550 --- /dev/null +++ b/tool/travis_retry.sh @@ -0,0 +1,13 @@ +#!/bin/sh -eu +# The modified version of `travis_retry` to support custom backoffs, which is used by .travis.yml. +# https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/bash/travis_retry.bash + +for sleep in 0 ${WAITS:- 1 25 100}; do + sleep "$sleep" + + echo "+ $@" + if "$@"; then + exit 0 + fi +done +exit 1 |