diff --git a/go/cmd/mysqlctld/cli/mysqlctld.go b/go/cmd/mysqlctld/cli/mysqlctld.go index 7a5ff6a5ce6..2dff7da0f7f 100644 --- a/go/cmd/mysqlctld/cli/mysqlctld.go +++ b/go/cmd/mysqlctld/cli/mysqlctld.go @@ -67,6 +67,7 @@ var ( --mysql_port=17100 \ --socket_file=/path/to/socket_file`, Args: cobra.NoArgs, + Version: servenv.AppVersion.String(), PreRunE: servenv.CobraPreRunE, RunE: run, } diff --git a/go/cmd/topo2topo/cli/topo2topo.go b/go/cmd/topo2topo/cli/topo2topo.go index 5dda62eaed1..f6f69e08eda 100644 --- a/go/cmd/topo2topo/cli/topo2topo.go +++ b/go/cmd/topo2topo/cli/topo2topo.go @@ -52,6 +52,7 @@ var ( It can also be used to compare data between two topologies.`, Args: cobra.NoArgs, PreRunE: servenv.CobraPreRunE, + Version: servenv.AppVersion.String(), RunE: run, } ) diff --git a/go/cmd/vtexplain/cli/vtexplain.go b/go/cmd/vtexplain/cli/vtexplain.go index 5c15112917e..c8671cdb532 100644 --- a/go/cmd/vtexplain/cli/vtexplain.go +++ b/go/cmd/vtexplain/cli/vtexplain.go @@ -84,6 +84,7 @@ If no keyspace name is present, VTExplain will return the following error: "```\nvtexplain -- -shards 128 --vschema-file vschema.json --schema-file schema.sql --replication-mode \"ROW\" --output-mode text --sql \"INSERT INTO users (user_id, name) VALUES(1, 'john')\"\n```\n", Args: cobra.NoArgs, PreRunE: servenv.CobraPreRunE, + Version: servenv.AppVersion.String(), RunE: run, } ) diff --git a/go/cmd/vttestserver/cli/main.go b/go/cmd/vttestserver/cli/main.go index 644796c5bca..35362aa3263 100644 --- a/go/cmd/vttestserver/cli/main.go +++ b/go/cmd/vttestserver/cli/main.go @@ -104,6 +104,7 @@ func New() (cmd *cobra.Command) { Short: "vttestserver allows users to spawn a self-contained Vitess server for local testing/CI.", Args: cobra.NoArgs, PreRunE: servenv.CobraPreRunE, + Version: servenv.AppVersion.String(), RunE: run, } diff --git a/go/cmd/zkctld/cli/zkctld.go b/go/cmd/zkctld/cli/zkctld.go index 101f1013722..5ac3520868e 100644 --- a/go/cmd/zkctld/cli/zkctld.go +++ b/go/cmd/zkctld/cli/zkctld.go @@ -41,6 +41,7 @@ var ( Use: "zkctld", Short: "zkctld is a daemon that starts or initializes ZooKeeper with Vitess-specific configuration. It will stay running as long as the underlying ZooKeeper server, and will pass along SIGTERM.", Args: cobra.NoArgs, + Version: servenv.AppVersion.String(), PersistentPreRunE: servenv.CobraPreRunE, PostRun: func(cmd *cobra.Command, args []string) { logutil.Flush() diff --git a/go/flags/endtoend/zkctld.txt b/go/flags/endtoend/zkctld.txt index d808bd7ce67..20371e9e2d7 100644 --- a/go/flags/endtoend/zkctld.txt +++ b/go/flags/endtoend/zkctld.txt @@ -4,4 +4,5 @@ Usage: zkctld [flags] Flags: - -h, --help help for zkctld + -h, --help help for zkctld + -v, --version version for zkctld