1
1
mirror of https://github.com/wez/wezterm.git synced 2024-11-23 15:04:36 +03:00
wezterm/ci/retry.sh
Wez Furlong 0c4a320504 ci: reduce retries
There's not a lot of benefit for trying more than 3 times,
and we risk hitting API rate limits.
2021-12-06 20:46:02 -07:00

19 lines
209 B
Bash
Executable File

#!/bin/bash
set -x
set -e
max_attempts=4
attempt=1
until "$@"
do
if (( attempt == max_attempts ))
then
echo "Failed after $max_attempts attempts"
exit 1
fi
sleep 5
: $(( attempt++ ))
done