mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
scripts: continious_upload: retry if upload failed
This commit is contained in:
parent
cc6838ec97
commit
f8cf2c8953
@ -263,12 +263,21 @@ urlencode() {
|
|||||||
for FILE in "$@" ; do
|
for FILE in "$@" ; do
|
||||||
FULLNAME="${FILE}"
|
FULLNAME="${FILE}"
|
||||||
BASENAME="$(basename "${FILE}")"
|
BASENAME="$(basename "${FILE}")"
|
||||||
curl -H "Authorization: token ${GITHUB_TOKEN}" \
|
|
||||||
-H "Accept: application/vnd.github.manifold-preview" \
|
for retries in {1..10}; do
|
||||||
-H "Content-Type: application/octet-stream" \
|
echo "Upload attempt $retries"
|
||||||
--data-binary "@$FULLNAME" \
|
|
||||||
"$upload_url?name=$(urlencode "$BASENAME")"
|
if curl -H "Authorization: token ${GITHUB_TOKEN}" \
|
||||||
echo ""
|
-H "Accept: application/vnd.github.manifold-preview" \
|
||||||
|
-H "Content-Type: application/octet-stream" \
|
||||||
|
--data-binary "@$FULLNAME" \
|
||||||
|
"$upload_url?name=$(urlencode "$BASENAME")"; then
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
|
||||||
|
sleep 1m # try to avoid ratelimits???
|
||||||
|
echo ""
|
||||||
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
$shatool "$@"
|
$shatool "$@"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user