cmd/tailscale: remove dep on clientupdate package if feature is omitted
We already had a featuretag for clientupdate, but the CLI wasn't using it, making the "minbox" build (minimal combined tailscaled + CLI build) larger than necessary. Updates #12614 Change-Id: Idd7546c67dece7078f25b8f2ae9886f58d599002 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
569caefeb5
commit
40cd54daf7
@@ -1,6 +1,8 @@
|
||||
// Copyright (c) Tailscale Inc & contributors
|
||||
// SPDX-License-Identifier: BSD-3-Clause
|
||||
|
||||
//go:build !ts_omit_clientupdate
|
||||
|
||||
package cli
|
||||
|
||||
import (
|
||||
@@ -17,6 +19,14 @@ import (
|
||||
"tailscale.com/version/distro"
|
||||
)
|
||||
|
||||
func init() {
|
||||
maybeUpdateCmd = func() *ffcli.Command { return updateCmd }
|
||||
|
||||
clientupdateLatestTailscaleVersion.Set(func() (string, error) {
|
||||
return clientupdate.LatestTailscaleVersion(clientupdate.CurrentTrack)
|
||||
})
|
||||
}
|
||||
|
||||
var updateCmd = &ffcli.Command{
|
||||
Name: "update",
|
||||
ShortUsage: "tailscale update",
|
||||
|
||||
Reference in New Issue
Block a user