mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-02-03 13:11:48 +02:00
Merge pull request #282 from goreleaser/release-upload
throttling file uploads
This commit is contained in:
commit
9dd2a00c30
@ -42,9 +42,14 @@ func doRun(ctx *context.Context, client client.Client) error {
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
var g errgroup.Group
|
var g errgroup.Group
|
||||||
|
sem := make(chan bool, 4)
|
||||||
for _, artifact := range ctx.Artifacts {
|
for _, artifact := range ctx.Artifacts {
|
||||||
|
sem <- true
|
||||||
artifact := artifact
|
artifact := artifact
|
||||||
g.Go(func() error {
|
g.Go(func() error {
|
||||||
|
defer func() {
|
||||||
|
<-sem
|
||||||
|
}()
|
||||||
return upload(ctx, client, releaseID, artifact)
|
return upload(ctx, client, releaseID, artifact)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user