Upgrade to specific version
In our CI server, we pin the version of sentry-cli for repeatability. Currently, our build script has to do the following:
- Check if sentry-cli is installed at all.
- Move package.json if it exists (because of https://github.com/getsentry/sentry-cli/issues/2174)
- Check the version number of that installed version.
- Compare the installed version number to the desired version number
- Uninstall if we have the wrong version
- Install the desired version
- Move package.json back
Adding a --version option to sentry-cli update would allow us to simply update to the desired version.
Thanks for the feature suggestion @jasondentler.
However, I think this feature might not be super useful; if your CI has a version of sentry-cli which was released before we add the --version option, you would still need to fall back to your current workflow of uninstalling the current version before installing the desired version. Having the --version option would just make your logic more complex, since you would need to do different things based on whether your Sentry CLI version supports the --version argument.
That being said, we can still add this, I am just a bit skeptical of whether it actually will improve things for you.
Thanks @szokeasaurusrex Once this is supported, I plan to uninstall sentry-cli by hand from all our build agents. It'll install the correct new version on the next run.
Got it – if you're able to ensure that all of your runners have a new-enough Sentry CLI version, then this would work
I am gonna place this on our backlog, and it might take us some time to get around to it. But, please feel free to submit a PR if you would like to see this resolved sooner