1
0
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:
Carlos Alexandro Becker 2017-04-21 16:24:02 -03:00
parent c1c51c5005
commit 6a45097e2d
No known key found for this signature in database
GPG Key ID: E61E2F7DC14AB940

View File

@ -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