sentry-cli icon indicating copy to clipboard operation
sentry-cli copied to clipboard

Upgrade to specific version

Open jasondentler opened this issue 1 year ago • 4 comments

In our CI server, we pin the version of sentry-cli for repeatability. Currently, our build script has to do the following:

  1. Check if sentry-cli is installed at all.
  2. Move package.json if it exists (because of https://github.com/getsentry/sentry-cli/issues/2174)
  3. Check the version number of that installed version.
  4. Compare the installed version number to the desired version number
  5. Uninstall if we have the wrong version
  6. Install the desired version
  7. Move package.json back

Adding a --version option to sentry-cli update would allow us to simply update to the desired version.

jasondentler avatar Oct 01 '24 15:10 jasondentler

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.

szokeasaurusrex avatar Oct 02 '24 12:10 szokeasaurusrex

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.

jasondentler avatar Oct 02 '24 12:10 jasondentler

Got it – if you're able to ensure that all of your runners have a new-enough Sentry CLI version, then this would work

szokeasaurusrex avatar Oct 02 '24 12:10 szokeasaurusrex

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

szokeasaurusrex avatar Oct 02 '24 12:10 szokeasaurusrex