diff --git a/cmd/basecoin/commands/version.go b/cmd/basecoin/commands/version.go deleted file mode 100644 index b45addae83..0000000000 --- a/cmd/basecoin/commands/version.go +++ /dev/null @@ -1,29 +0,0 @@ -package commands - -import ( - "fmt" - - "github.com/spf13/cobra" - - "github.com/tendermint/basecoin/version" -) - -// VersionCmd - command to show the application version -var VersionCmd = &cobra.Command{ - Use: "version", - Short: "Show version info", - Run: func(cmd *cobra.Command, args []string) { - fmt.Println(version.Version) - }, -} - -// QuickVersionCmd - returns a version command based on version input -func QuickVersionCmd(version string) *cobra.Command { - return &cobra.Command{ - Use: "version", - Short: "Show version info", - Run: func(cmd *cobra.Command, args []string) { - fmt.Println(version) - }, - } -} diff --git a/cmd/basecoin/main.go b/cmd/basecoin/main.go index b99482e1dd..fc4fa691ac 100644 --- a/cmd/basecoin/main.go +++ b/cmd/basecoin/main.go @@ -6,6 +6,7 @@ import ( "github.com/tendermint/tmlibs/cli" "github.com/tendermint/basecoin" + client "github.com/tendermint/basecoin/client/commands" "github.com/tendermint/basecoin/cmd/basecoin/commands" "github.com/tendermint/basecoin/modules/auth" "github.com/tendermint/basecoin/modules/base" @@ -51,7 +52,7 @@ func main() { commands.StartCmd, //commands.RelayCmd, commands.UnsafeResetAllCmd, - commands.VersionCmd, + client.VersionCmd, ) cmd := cli.PrepareMainCmd(rt, "BC", os.ExpandEnv("$HOME/.basecoin")) diff --git a/cmd/eyes/main.go b/cmd/eyes/main.go index b915b09e93..c82cd7d196 100644 --- a/cmd/eyes/main.go +++ b/cmd/eyes/main.go @@ -6,6 +6,7 @@ import ( "github.com/tendermint/tmlibs/cli" "github.com/tendermint/basecoin" + client "github.com/tendermint/basecoin/client/commands" "github.com/tendermint/basecoin/cmd/basecoin/commands" "github.com/tendermint/basecoin/modules/base" "github.com/tendermint/basecoin/modules/eyes" @@ -36,7 +37,7 @@ func main() { InitCmd, commands.StartCmd, commands.UnsafeResetAllCmd, - commands.VersionCmd, + client.VersionCmd, ) cmd := cli.PrepareMainCmd(rt, "EYE", os.ExpandEnv("$HOME/.eyes")) diff --git a/docs/guide/counter/cmd/counter/main.go b/docs/guide/counter/cmd/counter/main.go index 37816b0421..705136964c 100644 --- a/docs/guide/counter/cmd/counter/main.go +++ b/docs/guide/counter/cmd/counter/main.go @@ -7,6 +7,7 @@ import ( "github.com/tendermint/tmlibs/cli" + client "github.com/tendermint/basecoin/client/commands" "github.com/tendermint/basecoin/cmd/basecoin/commands" "github.com/tendermint/basecoin/docs/guide/counter/plugins/counter" ) @@ -24,7 +25,7 @@ func main() { commands.InitCmd, commands.StartCmd, commands.UnsafeResetAllCmd, - commands.VersionCmd, + client.VersionCmd, ) cmd := cli.PrepareMainCmd(RootCmd, "CT", os.ExpandEnv("$HOME/.counter")) diff --git a/docs/guide/counter/cmd/countercli/main.go b/docs/guide/counter/cmd/countercli/main.go index 37afba1d41..975fb56553 100644 --- a/docs/guide/counter/cmd/countercli/main.go +++ b/docs/guide/counter/cmd/countercli/main.go @@ -70,6 +70,7 @@ func main() { BaseCli.AddCommand( commands.InitCmd, commands.ResetCmd, + commands.VersionCmd, keycmd.RootCmd, seeds.RootCmd, query.RootCmd,