status-go/cmd/status/main.go

33 lines
942 B
Go
Raw Normal View History

package main
import (
"fmt"
"github.com/status-im/status-go/geth"
2016-06-20 14:47:10 +00:00
)
var (
gitCommit = "rely on linker: -ldflags -X main.GitCommit"
buildStamp = "rely on linker: -ldflags -X main.buildStamp"
2016-09-21 12:22:42 +00:00
versionMajor = 0 // Major version component of the current release
versionMinor = 9 // Minor version component of the current release
2016-09-28 18:30:45 +00:00
versionPatch = 1 // Patch version component of the current release
2016-09-21 12:22:42 +00:00
versionMeta = "unstable" // Version metadata to append to the version string
)
2016-06-20 15:21:45 +00:00
func main() {
2016-09-21 12:22:42 +00:00
verString := fmt.Sprintf("%d.%d.%d", versionMajor, versionMinor, versionPatch)
if versionMeta != "" {
verString += "-" + versionMeta
}
if gitCommit != "" {
verString += "-" + gitCommit[:8]
}
netVersion := "mainnet"
if geth.UseTestnet == "true" {
netVersion = "testnet"
}
fmt.Printf("Status\nGit Commit: %s\nBuild Time: %s\nVersion: %s\nNetwork: %s\n",
gitCommit, buildStamp, verString, netVersion)
2016-06-20 15:21:45 +00:00
}