Merge PR #3343: Enrich version command's output

This commit is contained in:
Alessio Treglia
2019-01-22 21:16:29 +01:00
committed by Christopher Goes
parent fae7852b61
commit bf59291a79
5 changed files with 30 additions and 18 deletions
+6 -1
View File
@@ -2,6 +2,7 @@ package version
import (
"fmt"
"runtime"
"github.com/spf13/cobra"
)
@@ -22,5 +23,9 @@ func GetVersion() string {
// CMD
func printVersion(cmd *cobra.Command, args []string) {
fmt.Println(GetVersion())
fmt.Println("cosmos-sdk:", GetVersion())
fmt.Println("git commit:", Commit)
fmt.Println("vendor hash:", VendorDirHash)
fmt.Printf("go version %s %s/%s\n",
runtime.Version(), runtime.GOOS, runtime.GOARCH)
}