You've already forked goreleaser
mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-07-15 01:34:21 +02:00
@ -133,18 +133,6 @@ func (c *githubClient) Upload(
|
|||||||
releaseID int64,
|
releaseID int64,
|
||||||
name string,
|
name string,
|
||||||
file *os.File,
|
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 {
|
) error {
|
||||||
_, _, err := c.client.Repositories.UploadReleaseAsset(
|
_, _, err := c.client.Repositories.UploadReleaseAsset(
|
||||||
ctx,
|
ctx,
|
||||||
@ -156,11 +144,5 @@ func (c *githubClient) uploadRetry(
|
|||||||
},
|
},
|
||||||
file,
|
file,
|
||||||
)
|
)
|
||||||
if err != nil {
|
return err
|
||||||
if retry > maxRetries {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
return c.uploadRetry(ctx, releaseID, name, file, retry+1)
|
|
||||||
}
|
}
|
||||||
|
@ -46,3 +46,4 @@ func (Pipe) Publish(ctx *context.Context) error {
|
|||||||
})
|
})
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user