feat(gitea,release): add retry flag and remove verbose one

This commit is contained in:
wpetit 2023-03-06 14:13:19 +01:00
parent 6c5c580156
commit 3f1b8bcda1
1 changed files with 3 additions and 1 deletions

View File

@ -14,6 +14,7 @@ GITEA_RELEASE_IS_DRAFT=${GITEA_RELEASE_IS_DRAFT:-false}
GITEA_RELEASE_IS_PRERELEASE=${GITEA_RELEASE_IS_PRERELEASE:-true} GITEA_RELEASE_IS_PRERELEASE=${GITEA_RELEASE_IS_PRERELEASE:-true}
GITEA_RELEASE_BODY=${GITEA_RELEASE_BODY} GITEA_RELEASE_BODY=${GITEA_RELEASE_BODY}
GITEA_RELEASE_ATTACHMENTS=${GITEA_RELEASE_ATTACHMENTS} GITEA_RELEASE_ATTACHMENTS=${GITEA_RELEASE_ATTACHMENTS}
GITEA_UPLOAD_MAX_RETRY=${GITEA_UPLOAD_MAX_RETRY:-3}
function check_dependencies { function check_dependencies {
assert_command_available 'curl' assert_command_available 'curl'
@ -157,7 +158,8 @@ function gitea_api {
curl -L \ curl -L \
--fail \ --fail \
--ipv4 \ --ipv4 \
-v \ --progress-bar \
--retry "$GITEA_UPLOAD_MAX_RETRY" \
-u "$GITEA_RELEASE_USERNAME:$GITEA_RELEASE_PASSWORD" \ -u "$GITEA_RELEASE_USERNAME:$GITEA_RELEASE_PASSWORD" \
${args} \ ${args} \
"$GITEA_RELEASE_BASE_URL/api/v1$path" "$GITEA_RELEASE_BASE_URL/api/v1$path"