mirror of
https://github.com/tailscale/tailscale.git
synced 2024-11-25 19:15:34 +00:00
go.toolchain.rev: add Go toolchain rev, tool to print it out
Updates tailscale/corp#3385 Change-Id: Ia0e285a0ae836744539c97ff6eff207588159688 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
parent
431329e47c
commit
ebdd25920e
26
cmd/printdep/printdep.go
Normal file
26
cmd/printdep/printdep.go
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
// Copyright (c) 2021 Tailscale Inc & AUTHORS All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
// The printdep command is a build system tool for printing out information
|
||||||
|
// about dependencies.
|
||||||
|
package main
|
||||||
|
|
||||||
|
import (
|
||||||
|
"flag"
|
||||||
|
"fmt"
|
||||||
|
"strings"
|
||||||
|
|
||||||
|
ts "tailscale.com"
|
||||||
|
)
|
||||||
|
|
||||||
|
var (
|
||||||
|
goToolchain = flag.Bool("go", false, "print the supported Go toolchain git hash (a github.com/tailscale/go commit)")
|
||||||
|
)
|
||||||
|
|
||||||
|
func main() {
|
||||||
|
flag.Parse()
|
||||||
|
if *goToolchain {
|
||||||
|
fmt.Println(strings.TrimSpace(ts.GoToolchainRev))
|
||||||
|
}
|
||||||
|
}
|
1
go.toolchain.rev
Normal file
1
go.toolchain.rev
Normal file
@ -0,0 +1 @@
|
|||||||
|
118f76c18c3f755ba0e6211e170a6422871f2791
|
@ -9,3 +9,9 @@
|
|||||||
|
|
||||||
//go:embed VERSION.txt
|
//go:embed VERSION.txt
|
||||||
var Version string
|
var Version 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
|
||||||
|
Loading…
Reference in New Issue
Block a user