mirror of
https://github.com/tailscale/tailscale.git
synced 2025-08-22 02:50:42 +00:00
release/dist/synology: build synology packages with cmd/dist
Updates #8217 Signed-off-by: David Anderson <danderson@tailscale.com>
This commit is contained in:

committed by
Dave Anderson

parent
399a80785e
commit
32e0ba5e68
7
release/dist/dist.go
vendored
7
release/dist/dist.go
vendored
@@ -17,6 +17,7 @@ import (
|
||||
"sort"
|
||||
"strings"
|
||||
"sync"
|
||||
"time"
|
||||
|
||||
"tailscale.com/util/multierr"
|
||||
"tailscale.com/version/mkversion"
|
||||
@@ -44,6 +45,8 @@ type Build struct {
|
||||
Go string
|
||||
// Version is the version info of the build.
|
||||
Version mkversion.VersionInfo
|
||||
// Time is the timestamp of the build.
|
||||
Time time.Time
|
||||
|
||||
// once is a cache of function invocations that should run once per process
|
||||
// (for example building a helper docker container)
|
||||
@@ -86,6 +89,7 @@ func NewBuild(repo, out string) (*Build, error) {
|
||||
Out: out,
|
||||
Go: goTool,
|
||||
Version: mkversion.Info(),
|
||||
Time: time.Now().UTC(),
|
||||
extra: map[any]any{},
|
||||
goBuildLimit: make(chan struct{}, runtime.NumCPU()),
|
||||
}
|
||||
@@ -114,6 +118,9 @@ func (b *Build) Build(targets []Target) (files []string, err error) {
|
||||
go func(i int, t Target) {
|
||||
var err error
|
||||
defer func() {
|
||||
if err != nil {
|
||||
err = fmt.Errorf("%s: %w", t, err)
|
||||
}
|
||||
errs[i] = err
|
||||
wg.Done()
|
||||
}()
|
||||
|
Reference in New Issue
Block a user