diff --git a/version-embed.go b/version-embed.go new file mode 100644 index 0000000000000..a4b12982cc51c --- /dev/null +++ b/version-embed.go @@ -0,0 +1,11 @@ +// 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. + +// Package tailscaleroot embeds VERSION.txt into the binary. +package tailscaleroot + +import _ "embed" + +//go:embed VERSION.txt +var Version string diff --git a/version/version.go b/version/version.go index ab4cadb22d2e7..4866b64bd756e 100644 --- a/version/version.go +++ b/version/version.go @@ -5,10 +5,20 @@ // Package version provides the version that the binary was built at. package version +import ( + "strings" + + tailscaleroot "tailscale.com" +) + // Long is a full version number for this build, of the form // "x.y.z-commithash", or "date.yyyymmdd" if no actual version was // provided. -var Long = "date.20211004" +var Long = "date.20211022" + +func init() { + Long = strings.TrimSpace(tailscaleroot.Version) + "-" + Long +} // Short is a short version number for this build, of the form // "x.y.z", or "date.yyyymmdd" if no actual version was provided.