1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-09-16 09:26:52 +02:00

Merge pull request #282 from goreleaser/release-upload

throttling file uploads
This commit is contained in:
Carlos Alexandro Becker
2017-07-04 22:05:46 -03:00
committed by GitHub

View File

@@ -42,9 +42,14 @@ func doRun(ctx *context.Context, client client.Client) error {
return err
}
var g errgroup.Group
sem := make(chan bool, 4)
for _, artifact := range ctx.Artifacts {
sem <- true
artifact := artifact
g.Go(func() error {
defer func() {
<-sem
}()
return upload(ctx, client, releaseID, artifact)
})
}