bugsnag / bugsnag-cli

CLI for uploading symbol files and creating releases on your BugSnag dashboard
https://docs.bugsnag.com/build-integrations/bugsnag-cli/
MIT License
3 stars 1 forks source link

unknown flag --app-version #104

Closed bytehala closed 5 months ago

bytehala commented 5 months ago

Describe the bug

Running bugsnag-cli create-build without app-version says "missing app version" Providing app version says "unknown flag --app-version"

The two errors are contradictory and confusing

Steps to reproduce

  1. Run bugsnag-cli create-build --api-key=1 --app-version=1
  2. See error

Environment

Example code snippet

Run these commands on terminal

(base) ➜  ~ bugsnag-cli --version   
2.2.0
(base) ➜  ~ bugsnag-cli create-build
[ERROR] missing api key, please specify using `--api-key`
(base) ➜  ~ bugsnag-cli create-build --api-key=1                
[ERROR] missing app version, please specify using `--app-version`
(base) ➜  ~ bugsnag-cli create-build --api-key=1 --app-version=1
bugsnag-cli: error: unknown flag --app-version
Error messages: ``` bugsnag-cli: error: unknown flag --app-version ```
mclack commented 5 months ago

Hi @bytehala

Thank you for raising this with us.

As of v2.0.0 of the bugsnag-cli, the --app-version flag has been renamed to --version-name in order to remain consistent with naming conventions, along with a few other flags: https://github.com/bugsnag/bugsnag-cli/blob/v2.0.0/UPGRADING.md

It appears that our documentation and the message that the CLI displays when an app version isn't included hasn't been updated accordingly, so we have now added a task to change this at the earliest convenience.

If you attempt to create a build using --version-name instead, you should find that this works. Please let us know if you have any further issues with this.

mclack commented 5 months ago

Hi again @bytehala

It turns out that the incorrect error message in the bugsnag-cli was fixed in the v2.3.0 release: https://github.com/bugsnag/bugsnag-cli/releases/tag/v2.3.0

We have also now updated our documentation to reflect these flag name changes: https://docs.bugsnag.com/build-integrations/bugsnag-cli/create-build/#available-options

As such, I am now closing this issue. Please feel free to reach out again if you have any other issues, either via GitHub, or by opening a ticket with us directly by contacting support@bugsnag.com.