Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a version command #66

Open
ledouxpl opened this issue Nov 16, 2021 · 3 comments
Open

Add a version command #66

ledouxpl opened this issue Nov 16, 2021 · 3 comments

Comments

@ledouxpl
Copy link

Adding a version command printing out the pubsub_cli version would be neat.

Without this feature, knowing which version is installed in our containers is difficult.

@k-yomo
Copy link
Owner

k-yomo commented Nov 17, 2021

You can check the version with pubsub_cli -v!

@ledouxpl
Copy link
Author

🤔 It does not seem to work on my end, at least with version 1.7.1...

root@2b6fe3149e85:~# pubsub_cli -v
Error: unknown shorthand flag: 'v' in -v
Usage:
  pubsub_cli [command]

Available Commands:
  completion          generate the autocompletion script for the specified shell
  connect             connect remote topics to local topics
  create_subscription create Pub/Sub subscription
  create_topic        create Pub/Sub topic
  help                Help about any command
  publish             publish Pub/Sub message
  register_push       register Pub/Sub push endpoint
  subscribe           subscribe Pub/Sub topics

Flags:
  -c, --cred-file string   gcp credential file path (You can also set 'GOOGLE_APPLICATION_CREDENTIALS' to env variable)
      --help               help for pubsub_cli
  -h, --host string        emulator host (You can also set 'PUBSUB_EMULATOR_HOST' to env variable) (default "pubsub:8085")
  -p, --project string     gcp project id (You can also set 'GCP_PROJECT_ID' to env variable)

Use "pubsub_cli [command] --help" for more information about a command.

[error] unknown shorthand flag: 'v' in -v

Maybe I missed it, but the -v argument does not seem to be listed in the cli's help or the doc either.

@k-yomo
Copy link
Owner

k-yomo commented Jan 9, 2023

@ledouxpl
Sorry for the very late reply...! I couldn't reproduce the issue.
If still version command is not shown, could you share the environment and which binary you are using?

 pubsub_cli                                       ✔  16:54:36 
Very simple cloud Pub/Sub CLI used as publisher / subscriber

Usage:
  pubsub_cli [command]

Available Commands:
  completion          generate the autocompletion script for the specified shell
  connect             connect remote topics to local topics
  create_subscription create Pub/Sub subscription
  create_topic        create Pub/Sub topic
  help                Help about any command
  publish             publish Pub/Sub message
  register_push       register Pub/Sub push endpoint
  subscribe           subscribe Pub/Sub topics

Flags:
  -c, --cred-file string   gcp credential file path (You can also set 'GOOGLE_APPLICATION_CREDENTIALS' to env variable)
      --help               help for pubsub_cli
  -h, --host string        emulator host (You can also set 'PUBSUB_EMULATOR_HOST' to env variable)
  -p, --project string     gcp project id (You can also set 'GCP_PROJECT_ID' to env variable)
  -v, --version            version for pubsub_cli

Use "pubsub_cli [command] --help" for more information about a command.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants