1
0
mirror of https://github.com/goreleaser/goreleaser.git synced 2025-03-17 20:47:50 +02:00

fix: snapcraft: respect parallelism

This commit is contained in:
Carlos Alexandro Becker 2018-05-27 20:10:06 -03:00
parent 92abd2e2fd
commit eb2ff88747
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -83,15 +83,20 @@ func (Pipe) Run(ctx *context.Context) error {
}
var g errgroup.Group
sem := make(chan bool, ctx.Parallelism)
for platform, binaries := range ctx.Artifacts.Filter(
artifact.And(
artifact.ByGoos("linux"),
artifact.ByType(artifact.Binary),
),
).GroupByPlatform() {
sem <- true
arch := linux.Arch(platform)
binaries := binaries
g.Go(func() error {
go func() {
<-sem
}()
return create(ctx, arch, binaries)
})
}