diff --git a/go.toolchain.next.rev b/go.toolchain.next.rev index 205355c47..858ec57df 100644 --- a/go.toolchain.next.rev +++ b/go.toolchain.next.rev @@ -1 +1 @@ -f4de14a515221e27c0d79446b423849a6546e3a6 +179b46cade24e44f53b53a3cbcc7b7eb78469c31 diff --git a/go.toolchain.rev b/go.toolchain.rev index 205355c47..858ec57df 100644 --- a/go.toolchain.rev +++ b/go.toolchain.rev @@ -1 +1 @@ -f4de14a515221e27c0d79446b423849a6546e3a6 +179b46cade24e44f53b53a3cbcc7b7eb78469c31 diff --git a/go.toolchain.rev.sri b/go.toolchain.rev.sri index 86b2083ff..4efbc9f7c 100644 --- a/go.toolchain.rev.sri +++ b/go.toolchain.rev.sri @@ -1 +1 @@ -sha256-qmX68/Ml/jvf+sD9qykdx9QhSbkYaF8xJMFtd3iLHI8= +sha256-VH+AgB1qjopwiB4w2SHrJm61O6yAl5ZaCGaDYnzb03o= diff --git a/version/version.go b/version/version.go index 1171ed2ff..7d8efc375 100644 --- a/version/version.go +++ b/version/version.go @@ -172,6 +172,10 @@ func majorMinorPatch() string { return ret } +// IsTailscaleGo reports whether the current binary was built with +// Tailscale's custom Go toolchain. +func IsTailscaleGo() bool { return isTailscaleGo } + func isValidLongWithTwoRepos(v string) bool { s := strings.Split(v, "-") if len(s) != 3 { diff --git a/version/version_not_tsgo.go b/version/version_not_tsgo.go new file mode 100644 index 000000000..a852964ab --- /dev/null +++ b/version/version_not_tsgo.go @@ -0,0 +1,8 @@ +// Copyright (c) Tailscale Inc & contributors +// SPDX-License-Identifier: BSD-3-Clause + +//go:build !tailscale_go + +package version + +const isTailscaleGo = false diff --git a/version/version_tsgo.go b/version/version_tsgo.go new file mode 100644 index 000000000..fd72af7d4 --- /dev/null +++ b/version/version_tsgo.go @@ -0,0 +1,8 @@ +// Copyright (c) Tailscale Inc & contributors +// SPDX-License-Identifier: BSD-3-Clause + +//go:build tailscale_go + +package version + +const isTailscaleGo = true