Move version and commit sha into main.go.
parent
0cc1818eaa
commit
f5954ace5e
|
@ -28,6 +28,12 @@ const logo = `
|
||||||
+---------------------------------------------+
|
+---------------------------------------------+
|
||||||
`
|
`
|
||||||
|
|
||||||
|
// These variables are populated via the Go linker.
|
||||||
|
var (
|
||||||
|
version string
|
||||||
|
commit string
|
||||||
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
if err := start(); err != nil {
|
if err := start(); err != nil {
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
|
@ -48,7 +54,7 @@ func start() error {
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||||
flag.Parse()
|
flag.Parse()
|
||||||
|
|
||||||
v := fmt.Sprintf("InfluxDB v%s (git: %s)", version, gitSha)
|
v := fmt.Sprintf("InfluxDB v%s (git: %s)", version, commit)
|
||||||
if *showVersion {
|
if *showVersion {
|
||||||
fmt.Println(v)
|
fmt.Println(v)
|
||||||
return nil
|
return nil
|
||||||
|
|
Loading…
Reference in New Issue