mirror of
https://github.com/tailscale/tailscale.git
synced 2025-03-28 12:02:23 +00:00
hostinfo: set Hostinfo.PackageType for mkctr container builds
Fixes tailscale/corp#21448 Change-Id: Id60fb5cd7d31ef94cdbb176141e034845a480a00 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
1ac14d7216
commit
0b32adf9ec
@ -49,7 +49,7 @@ case "$TARGET" in
|
|||||||
-X tailscale.com/version.gitCommitStamp=${VERSION_GIT_HASH}" \
|
-X tailscale.com/version.gitCommitStamp=${VERSION_GIT_HASH}" \
|
||||||
--base="${BASE}" \
|
--base="${BASE}" \
|
||||||
--tags="${TAGS}" \
|
--tags="${TAGS}" \
|
||||||
--gotags="ts_kube" \
|
--gotags="ts_kube,ts_package_container" \
|
||||||
--repos="${REPOS}" \
|
--repos="${REPOS}" \
|
||||||
--push="${PUSH}" \
|
--push="${PUSH}" \
|
||||||
--target="${PLATFORM}" \
|
--target="${PLATFORM}" \
|
||||||
|
@ -159,7 +159,14 @@ func linuxVersionMeta() (meta versionMeta) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// linuxBuildTagPackageType is set by packagetype_*.go
|
||||||
|
// build tag guarded files.
|
||||||
|
var linuxBuildTagPackageType string
|
||||||
|
|
||||||
func packageTypeLinux() string {
|
func packageTypeLinux() string {
|
||||||
|
if v := linuxBuildTagPackageType; v != "" {
|
||||||
|
return v
|
||||||
|
}
|
||||||
// Report whether this is in a snap.
|
// Report whether this is in a snap.
|
||||||
// See https://snapcraft.io/docs/environment-variables
|
// See https://snapcraft.io/docs/environment-variables
|
||||||
// We just look at two somewhat arbitrarily.
|
// We just look at two somewhat arbitrarily.
|
||||||
|
10
hostinfo/packagetype_container.go
Normal file
10
hostinfo/packagetype_container.go
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (c) Tailscale Inc & AUTHORS
|
||||||
|
// SPDX-License-Identifier: BSD-3-Clause
|
||||||
|
|
||||||
|
//go:build linux && ts_package_container
|
||||||
|
|
||||||
|
package hostinfo
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
linuxBuildTagPackageType = "container"
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user