package main import ( "fmt" "os" "runtime" "strings" "github.com/status-im/status-go/geth/params" "gopkg.in/urfave/cli.v1" ) var ( versionCommand = cli.Command{ Action: version, Name: "version", Usage: "Print app version", } ) // version displays app version func version(ctx *cli.Context) error { fmt.Println(strings.Title(params.ClientIdentifier)) fmt.Println("Version:", params.Version) if gitCommit != "" { fmt.Println("Git Commit:", gitCommit) } if buildStamp != "" { fmt.Println("Build Stamp:", buildStamp) } fmt.Println("Network Id:", ctx.GlobalInt(NetworkIDFlag.Name)) fmt.Println("Go Version:", runtime.Version()) fmt.Println("OS:", runtime.GOOS) fmt.Printf("GOPATH=%s\n", os.Getenv("GOPATH")) fmt.Printf("GOROOT=%s\n", runtime.GOROOT()) return nil }