mirror of https://github.com/hashicorp/consul
Adds basic build tag support with different versions. (#2463)
parent
e8caf76339
commit
2a950f3897
@ -1,23 +1,21 @@
|
|||||||
package main
|
package version
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
// The git commit that was compiled. This will be filled in by the compiler.
|
|
||||||
var (
|
var (
|
||||||
|
// The git commit that was compiled. These will be filled in by the
|
||||||
|
// compiler.
|
||||||
GitCommit string
|
GitCommit string
|
||||||
GitDescribe string
|
GitDescribe string
|
||||||
)
|
|
||||||
|
|
||||||
// The main version number that is being run at the moment.
|
|
||||||
const Version = "0.7.1"
|
|
||||||
|
|
||||||
// A pre-release marker for the version. If this is "" (empty string)
|
// Release versions of the build. These will be filled in by one of the
|
||||||
// then it means that it is a final release. Otherwise, this is a pre-release
|
// build tag-specific files.
|
||||||
// such as "dev" (in development), "beta", "rc1", etc.
|
Version = "unknown"
|
||||||
const VersionPrerelease = "dev"
|
VersionPrerelease = "unknown"
|
||||||
|
)
|
||||||
|
|
||||||
// GetHumanVersion composes the parts of the version in a way that's suitable
|
// GetHumanVersion composes the parts of the version in a way that's suitable
|
||||||
// for displaying to humans.
|
// for displaying to humans.
|
@ -0,0 +1,16 @@
|
|||||||
|
// +build consul
|
||||||
|
|
||||||
|
package version
|
||||||
|
|
||||||
|
// NOTE we rely on other "version_*.go" files to be lexically after
|
||||||
|
// "version_base.go" in order for this to get properly overridden. Be careful
|
||||||
|
// adding new versions and pick a name that will follow "version_base.go".
|
||||||
|
func init() {
|
||||||
|
// The main version number that is being run at the moment.
|
||||||
|
Version = "0.7.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.
|
||||||
|
VersionPrerelease = "dev"
|
||||||
|
}
|
Loading…
Reference in new issue