cmd/printdep: add --next flag to use rc Go build hash instead

Updates tailscale/corp#36382

Change-Id: Ib7474b0aab901e98f0fe22761e26fd181650743c
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick
2026-01-27 14:44:32 -08:00
committed by Brad Fitzpatrick
parent a374cc344e
commit 8f8236feb3
3 changed files with 16 additions and 2 deletions
+3
View File
@@ -17,6 +17,9 @@ func init() {
panic("binary built with tailscale_go build tag but failed to read build info or find tailscale.toolchain.rev in build info")
}
want := strings.TrimSpace(GoToolchainRev)
if os.Getenv("TS_GO_NEXT") == "1" {
want = strings.TrimSpace(GoToolchainNextRev)
}
if tsRev != want {
if os.Getenv("TS_PERMIT_TOOLCHAIN_MISMATCH") == "1" {
fmt.Fprintf(os.Stderr, "tailscale.toolchain.rev = %q, want %q; but ignoring due to TS_PERMIT_TOOLCHAIN_MISMATCH=1\n", tsRev, want)