mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-10 03:47:03 +02:00
cleaner semaphore handling in build.go
This commit is contained in:
parent
c1c51c5005
commit
6a45097e2d
@ -32,14 +32,13 @@ func (Pipe) Run(ctx *context.Context) error {
|
||||
var g errgroup.Group
|
||||
for _, goos := range ctx.Config.Build.Goos {
|
||||
for _, goarch := range ctx.Config.Build.Goarch {
|
||||
sem <- true
|
||||
goos := goos
|
||||
goarch := goarch
|
||||
if !valid(goos, goarch) {
|
||||
log.Printf("Skipped build for %v/%v\n", goos, goarch)
|
||||
<-sem
|
||||
continue
|
||||
}
|
||||
sem <- true
|
||||
name, err := nameFor(ctx, goos, goarch)
|
||||
if err != nil {
|
||||
return err
|
||||
|
Loading…
Reference in New Issue
Block a user