version: add support for setting version with the -X Go linker flag

Updates tailscale/tailscale#486

Signed-off-by: Elias Naur <mail@eliasnaur.com>
reviewable/pr511/r1
Elias Naur 4 years ago committed by Brad Fitzpatrick
parent 6fbd1abcd3
commit c2682553ff

@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// +build !redo
// +build !redo,!xversion
// Package version provides the version that the binary was built at.
package version
const LONG = "date.20200618"
const LONG = "date.20200622"
const SHORT = LONG

@ -0,0 +1,11 @@
// Copyright (c) 2020 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.
// +build !redo,xversion
package version
// Replaced at build time with the Go linker flag -X.
var LONG string = "<not set>"
var SHORT string = "<not set>"
Loading…
Cancel
Save