mirror of
https://github.com/pbek/QOwnNotes.git
synced 2025-06-28 21:09:52 +00:00
release: retry uploading archive
Signed-off-by: Patrizio Bekerle <patrizio@bekerle.com>
This commit is contained in:
parent
4457b957d3
commit
7f5bca329a
1 changed files with 15 additions and 2 deletions
|
@ -99,8 +99,21 @@ echo "QOWNNOTES_ARCHIVE_SIZE=$QOWNNOTES_ARCHIVE_SIZE" >>${_QQwnNotesCheckSumVarF
|
||||||
|
|
||||||
echo "Uploading files to GitHub..."
|
echo "Uploading files to GitHub..."
|
||||||
|
|
||||||
# upload archive and checksum files (we need to be in a git repo for that!)
|
# Upload archive and checksum files for 5minutes, retrying every 5 seconds
|
||||||
gh release upload --clobber v$QOWNNOTES_VERSION ${archiveFile}*
|
# We need to be in a git repo for that
|
||||||
|
timeout=$((5 * 60))
|
||||||
|
interval=5
|
||||||
|
start_time=$(date +%s)
|
||||||
|
while ! gh release upload --clobber v$QOWNNOTES_VERSION ${archiveFile}*; do
|
||||||
|
now=$(date +%s)
|
||||||
|
elapsed=$((now - start_time))
|
||||||
|
if [ $elapsed -ge $timeout ]; then
|
||||||
|
echo "Upload failed after 5 minutes."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "Upload failed, retrying in $interval seconds..."
|
||||||
|
sleep $interval
|
||||||
|
done
|
||||||
|
|
||||||
# remove everything after we are done
|
# remove everything after we are done
|
||||||
if [ -d $PROJECT_PATH ]; then
|
if [ -d $PROJECT_PATH ]; then
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue