mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-02-01 13:07:49 +02:00
Revert "fix: retry upload (#900)"
This reverts commit 6e09a19a83ed4b643981800aa2ecf1143dcb23c9.
This commit is contained in:
parent
6e09a19a83
commit
6fb427e5c8
@ -133,18 +133,6 @@ func (c *githubClient) Upload(
|
||||
releaseID int64,
|
||||
name string,
|
||||
file *os.File,
|
||||
) error {
|
||||
return c.uploadRetry(ctx, releaseID, name, file, 0)
|
||||
}
|
||||
|
||||
const maxRetries = 10
|
||||
|
||||
func (c *githubClient) uploadRetry(
|
||||
ctx *context.Context,
|
||||
releaseID int64,
|
||||
name string,
|
||||
file *os.File,
|
||||
retry int,
|
||||
) error {
|
||||
_, _, err := c.client.Repositories.UploadReleaseAsset(
|
||||
ctx,
|
||||
@ -156,11 +144,5 @@ func (c *githubClient) uploadRetry(
|
||||
},
|
||||
file,
|
||||
)
|
||||
if err != nil {
|
||||
if retry > maxRetries {
|
||||
return err
|
||||
}
|
||||
return err
|
||||
}
|
||||
return c.uploadRetry(ctx, releaseID, name, file, retry+1)
|
||||
return err
|
||||
}
|
||||
|
@ -46,3 +46,4 @@ func (Pipe) Publish(ctx *context.Context) error {
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user