mirror of
https://github.com/tailscale/tailscale.git
synced 2025-01-09 09:33:42 +00:00
36ea792f06
Fixes #14492 ----- Developer Certificate of Origin Version 1.1 Copyright (C) 2004, 2006 The Linux Foundation and its contributors. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Developer's Certificate of Origin 1.1 By making a contribution to this project, I certify that: (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved. Change-Id: I6dc1068d34bbfa7477e7b7a56a4325b3868c92e1 Signed-off-by: Marc Paquette <marcphilippaquette@gmail.com>
42 lines
1.1 KiB
Go
42 lines
1.1 KiB
Go
// Copyright (c) Tailscale Inc & AUTHORS
|
|
// SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
// Package tailscaleroot embeds VERSION.txt into the binary.
|
|
package tailscaleroot
|
|
|
|
import (
|
|
_ "embed"
|
|
"runtime/debug"
|
|
)
|
|
|
|
// VersionDotTxt is the contents of VERSION.txt. Despite the tempting filename,
|
|
// this does not necessarily contain the accurate version number of the build, which
|
|
// depends on the branch type and how it was built. To get version information, use
|
|
// the version package instead.
|
|
//
|
|
//go:embed VERSION.txt
|
|
var VersionDotTxt string
|
|
|
|
//go:embed ALPINE.txt
|
|
var AlpineDockerTag string
|
|
|
|
// GoToolchainRev is the git hash from github.com/tailscale/go that this release
|
|
// should be built using. It may end in a newline.
|
|
//
|
|
//go:embed go.toolchain.rev
|
|
var GoToolchainRev string
|
|
|
|
//lint:ignore U1000 used by tests + assert_ts_toolchain_match.go w/ right build tags
|
|
func tailscaleToolchainRev() (gitHash string, ok bool) {
|
|
bi, ok := debug.ReadBuildInfo()
|
|
if !ok {
|
|
return "", false
|
|
}
|
|
for _, s := range bi.Settings {
|
|
if s.Key == "tailscale.toolchain.rev" {
|
|
return s.Value, true
|
|
}
|
|
}
|
|
return "", false
|
|
}
|