|
|
|
@ -3,6 +3,7 @@ package main |
|
|
|
|
import ( |
|
|
|
|
"fmt" |
|
|
|
|
"os" |
|
|
|
|
"path" |
|
|
|
|
|
|
|
|
|
"github.com/harmony-one/go-sdk/client/cmd" |
|
|
|
|
"github.com/spf13/cobra" |
|
|
|
@ -20,7 +21,9 @@ func main() { |
|
|
|
|
Use: "version", |
|
|
|
|
Short: "Show version", |
|
|
|
|
Run: func(cmd *cobra.Command, args []string) { |
|
|
|
|
fmt.Printf("%s %s %s %s", version, commit, builtAt, builtBy) |
|
|
|
|
fmt.Fprintf(os.Stderr, |
|
|
|
|
"Harmony (C) 2019. %v, version %v-%v (%v %v)\n", |
|
|
|
|
path.Base(os.Args[0]), version, commit, builtBy, builtAt) |
|
|
|
|
os.Exit(0) |
|
|
|
|
}, |
|
|
|
|
}) |
|
|
|
|