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:
parent
92abd2e2fd
commit
eb2ff88747
@ -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)
|
||||
})
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user