Skip to content

Commit 5b06680

Browse files
committed
Give a chance for download_all_github_artifacts.py to fail and to try again, without breaking the release script.
Previously any error in download_all_github_artifacts.py was ignored and the script was continuing (without success ofc).
1 parent 604dba7 commit 5b06680

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

tools/release/release.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,11 +185,24 @@ targetPath="./tmp/Element/${version}"
185185
printf "\n================================================================================\n"
186186
printf "Downloading the artifacts...\n"
187187

188-
python3 ./tools/github/download_all_github_artifacts.py \
188+
ret=1
189+
190+
while [[ $ret -ne 0 ]]; do
191+
python3 ./tools/github/download_all_github_artifacts.py \
189192
--token "${gitHubToken}" \
190193
--runUrl "${runUrl}" \
191194
--directory "${targetPath}"
192195

196+
ret=$?
197+
if [[ $ret -ne 0 ]]; then
198+
read -p "Error while downloading the artifacts. You may want to fix the issue and retry. Retry (yes/no) default to yes? " doRetry
199+
doRetry=${doRetry:-yes}
200+
if [ "${doRetry}" == "no" ]; then
201+
exit 1
202+
fi
203+
fi
204+
done
205+
193206
printf "\n================================================================================\n"
194207
printf "Unzipping the F-Droid artifact...\n"
195208

0 commit comments

Comments
 (0)