1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-01-24 04:16:27 +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
commit 9dd2a00c30

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)
})
}