Release: weekly deploy
This commit is contained in:
@@ -464,8 +464,24 @@ if (Get-StepEnabled $steps 'gitCommitPush') {
|
||||
if ($code -ne 0) { return $code }
|
||||
}
|
||||
|
||||
$code = Invoke-Git @('push', 'origin', $branch)
|
||||
if ($code -ne 0) { return $code }
|
||||
$pushAttempts = 2
|
||||
for ($attempt = 1; $attempt -le $pushAttempts; $attempt++) {
|
||||
$code = Invoke-Git @('push', 'origin', $branch)
|
||||
if ($code -eq 0) { break }
|
||||
if ($attempt -lt $pushAttempts) {
|
||||
Write-Host "Git push failed (exit $code). Retrying once in 3s..." -ForegroundColor Yellow
|
||||
Start-Sleep -Seconds 3
|
||||
}
|
||||
}
|
||||
if ($code -ne 0) {
|
||||
Write-Host 'Git push authentication failed for Gitea.' -ForegroundColor Red
|
||||
Write-Host 'Fix: create a Gitea token with repo write access, then run:' -ForegroundColor Yellow
|
||||
Write-Host ' git push origin main' -ForegroundColor Yellow
|
||||
Write-Host 'If prompted credentials fail, clear cached token:' -ForegroundColor Yellow
|
||||
Write-Host ' "protocol=https`nhost=gitea.mysuperlab.netcraze.pro`n" | git credential reject' -ForegroundColor Yellow
|
||||
Write-Host 'Then push again and resume release with gitCommitPush disabled.' -ForegroundColor Yellow
|
||||
return $code
|
||||
}
|
||||
return 0
|
||||
}
|
||||
if (-not $ok) { Write-ReleaseBanner -Success $false -FailedAt $FailedStep; exit 1 }
|
||||
|
||||
Reference in New Issue
Block a user