diff --git a/Makefile b/Makefile index 9d7a4345a..52a1ec789 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ ci: get_tools get_vendor_deps build test_cover # This can be unified later, here for easy demos gaia: - go build $(BUILD_FLAGS) -o build/gaid ./examples/gaiad + go build $(BUILD_FLAGS) -o build/gaiad ./examples/gaiad go build $(BUILD_FLAGS) -o build/gaiacli ./examples/gaiacli build: diff --git a/examples/gaiacli/client.go b/examples/gaiacli/client.go index 4d25a4d4d..5daae467f 100644 --- a/examples/gaiacli/client.go +++ b/examples/gaiacli/client.go @@ -53,14 +53,10 @@ func init() { postCmd.PersistentFlags().String(flagPassword, "", "Password to use the named private key") } -// ClientCommands returns a sub-tree of all basic client commands +// AddClientCommands returns a sub-tree of all basic client commands // // Call AddGetCommand and AddPostCommand to add custom txs and queries -func ClientCommands() *cobra.Command { - cmd := &cobra.Command{ - Use: "client", - Short: "Interact with the chain via a light-client", - } +func AddClientCommands(cmd *cobra.Command) { cmd.AddCommand( initClientCommand(), statusCmd, @@ -75,7 +71,6 @@ func ClientCommands() *cobra.Command { lineBreak, serveCommand(), ) - return cmd } // AddGetCommand adds one or more query subcommands diff --git a/examples/gaiacli/main.go b/examples/gaiacli/main.go index a898b98cd..a6570d227 100644 --- a/examples/gaiacli/main.go +++ b/examples/gaiacli/main.go @@ -15,11 +15,11 @@ const ( flagFee = "fee" ) -// chubCmd is the entry point for this binary +// gaiacliCmd is the entry point for this binary var ( - chubCmd = &cobra.Command{ - Use: "chub", - Short: "Cosmos Hub command-line tool", + gaiacliCmd = &cobra.Command{ + Use: "gaiacli", + Short: "Gaia light-client", } lineBreak = &cobra.Command{Run: func(*cobra.Command, []string) {}} @@ -55,16 +55,15 @@ func main() { AddGetCommand(getAccountCmd) AddPostCommand(postSendCommand()) - chubCmd.AddCommand( + AddClientCommands(gaiacliCmd) + gaiacliCmd.AddCommand( KeyCommands(), - ClientCommands(), lineBreak, VersionCmd, ) // prepare and add flags - // executor := cli.PrepareMainCmd(chubCmd, "CH", os.ExpandEnv("$HOME/.cosmos-chub")) - executor := cli.PrepareBaseCmd(chubCmd, "CH", os.ExpandEnv("$HOME/.cosmos-chub")) + executor := cli.PrepareBaseCmd(gaiacliCmd, "GA", os.ExpandEnv("$HOME/.cosmos-chub")) executor.Execute() } diff --git a/glide.yaml b/glide.yaml index 94dba7dda..c6d91cdd4 100644 --- a/glide.yaml +++ b/glide.yaml @@ -29,7 +29,6 @@ import: subpackages: - ripemd160 - package: github.com/spf13/cobra - version: ~0.0.1 - package: github.com/spf13/viper version: ^1.0.0 testImport: