docs+chore: retry upload on TLS/504 + refresh README/RELEASING

Upload script:
- Retry curl on transient network failures (504, schannel TLS abrupt
  close): up to 4 retries with 15s/45s/2m/5m backoff. Before each retry,
  list the release assets server-side — Gitea sometimes commits the
  body but times out the response, so the file may already be there at
  the expected size (skip retry). If present at wrong size (partial),
  delete before re-uploading. ASCII-only (PS5.1 reads files in CP1251
  without BOM).

Docs:
- README: bump release/test badges to v0.5.1 / 51 tests; mention silent
  retry in the auto-update feature line.
- RELEASING: rewrite around the new update-channel architecture, bridge
  tags, and dropped Gitea Actions workflows.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
AnRil
2026-05-18 22:37:33 +07:00
parent 6160ece8d4
commit d6f94ee1c9
3 changed files with 119 additions and 121 deletions

View File

@@ -48,7 +48,7 @@ if (-not $Tag) {
$Tag = "v$pkgVersion"
}
if (-not $AssetVersion) {
# Derive from tag when possible (vX.Y.Z X.Y.Z); otherwise read package.json.
# Derive from tag when possible (vX.Y.Z -> X.Y.Z); otherwise read package.json.
if ($Tag -match '^v\d+\.\d+\.\d+') {
$AssetVersion = $Tag.TrimStart('v')
} else {
@@ -101,7 +101,7 @@ try {
if ($prev) {
$log = (& git log --pretty=format:"- %s" "$prev..$Tag") -join "`n"
} else {
# No prior tag list last 10 commits up to this tag.
# No prior tag - list last 10 commits up to this tag.
$log = (& git log --pretty=format:"- %s" -n 10 "$Tag") -join "`n"
}
$body = "### Changes`n`n$log`n`n---`n`nInstaller below: run it; if app is already installed, it updates in place and keeps your settings."
@@ -181,7 +181,7 @@ foreach ($asset in @($installer, $blockmap, $manifest)) {
-Method Get -Headers $headers
$existing = $check | Where-Object { $_.name -eq $name }
if ($existing -and $existing.size -eq $size) {
Write-Host " Asset already present server-side ($($existing.size) bytes) skipping retry." -ForegroundColor DarkGray
Write-Host " Asset already present server-side ($($existing.size) bytes) - skipping retry." -ForegroundColor DarkGray
$uploaded = $true
break
}
@@ -210,7 +210,7 @@ foreach ($asset in @($installer, $blockmap, $manifest)) {
if ($LASTEXITCODE -eq 0) {
$uploaded = $true
} else {
Write-Host " curl exit $LASTEXITCODE will retry." -ForegroundColor Yellow
Write-Host " curl exit $LASTEXITCODE - will retry." -ForegroundColor Yellow
$attempt++
}
}