Allow version to build without requiring a build tag

This commit is contained in:
Jeff Mitchell 2016-08-10 20:01:15 -04:00
parent e57af52b41
commit 5c00a45aed
2 changed files with 17 additions and 10 deletions

View File

@ -5,9 +5,14 @@ import (
"fmt"
)
// The git commit that was compiled. This will be filled in by the compiler.
var GitCommit string
var GitDescribe string
var (
// The git commit that was compiled. This will be filled in by the compiler.
GitCommit string
GitDescribe string
Version string = "unknown"
VersionPrerelease = "unknown"
)
// VersionInfo
type VersionInfo struct {

View File

@ -1,11 +1,13 @@
// +build vault
// +build notvault
package version
// The main version number that is being run at the moment.
const Version = "0.6.1"
func init() {
// The main version number that is being run at the moment.
Version = "0.6.1"
// A pre-release marker for the version. If this is "" (empty string)
// then it means that it is a final release. Otherwise, this is a pre-release
// such as "dev" (in development), "beta", "rc1", etc.
const VersionPrerelease = "rc2"
// A pre-release marker for the version. If this is "" (empty string)
// then it means that it is a final release. Otherwise, this is a pre-release
// such as "dev" (in development), "beta", "rc1", etc.
VersionPrerelease = "rc2"
}