2023-02-24 22:19:13 +00:00
|
|
|
// Copyright (c) Tailscale Inc & AUTHORS
|
|
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
|
2023-02-24 21:22:21 +00:00
|
|
|
// The dist command builds Tailscale release packages for distribution.
|
|
|
|
package main
|
|
|
|
|
|
|
|
import (
|
|
|
|
"context"
|
|
|
|
"errors"
|
|
|
|
"flag"
|
|
|
|
"log"
|
|
|
|
"os"
|
|
|
|
|
|
|
|
"tailscale.com/release/dist"
|
2023-02-24 22:15:35 +00:00
|
|
|
"tailscale.com/release/dist/cli"
|
2023-02-24 21:22:21 +00:00
|
|
|
"tailscale.com/release/dist/unixpkgs"
|
|
|
|
)
|
|
|
|
|
2023-02-24 22:15:35 +00:00
|
|
|
func getTargets() ([]dist.Target, error) {
|
|
|
|
return unixpkgs.Targets(), nil
|
2023-02-24 21:22:21 +00:00
|
|
|
}
|
|
|
|
|
2023-02-24 22:15:35 +00:00
|
|
|
func main() {
|
|
|
|
cmd := cli.CLI(getTargets)
|
|
|
|
if err := cmd.ParseAndRun(context.Background(), os.Args[1:]); err != nil && !errors.Is(err, flag.ErrHelp) {
|
|
|
|
log.Fatal(err)
|
2023-02-24 21:22:21 +00:00
|
|
|
}
|
|
|
|
}
|