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

Automated upgrading #18

Open
felixfbecker opened this issue Sep 29, 2018 · 14 comments
Open

Automated upgrading #18

felixfbecker opened this issue Sep 29, 2018 · 14 comments

Comments

@felixfbecker
Copy link
Contributor

Now that the CLI is more important and used to publish extension we should make updating it easier. It should be possible to install with package managers like Homebrew, Chocolatey or apt. It should be as easy as it is to update PSSourcegraph :)

@slimsag
Copy link
Member

slimsag commented Sep 29, 2018

PSSourcegraph is in brew, chocolatey, and apt?

@felixfbecker
Copy link
Contributor Author

No PSSourcegraph can be installed from the PowerShell gallery with Install-Module, which is PowerShell specific. I'm just saying it should be the same experience.

@felixfbecker
Copy link
Contributor Author

What would also help is an in-app update check that checks against the GitHub releases API for the latest release and notifies if an update is available, and prints an update command to run. I'm just worried users will miss out of features and bugfixes, especially related to extension publishing.

@slimsag
Copy link
Member

slimsag commented Sep 29, 2018

Got it. I think what we should do is:

  1. src update check -> checks for updates, doesn't apply them.
  2. src update -> checks for updates, self-applies them. Will prompt for root/admin privileges.

@felixfbecker
Copy link
Contributor Author

I think we should avoid building a self-update mechanism in a dedicated command, in my experience these always fail in some way. The long-term solution should be supporting package managers. I was thinking more of a simple hint on every command run like https://www.npmjs.com/package/update-notifier does it.

@slimsag
Copy link
Member

slimsag commented Sep 29, 2018

Supporting package managers is fine and is good, but supporting all of them will take a lot of time and dedication (brew, chocolatey, apt, yum, alpine, etc) and as such is less realistic than building in self-updating. I've done the latter and feel it can reasonably be done in a day, not so with the alternatives.

We can provide a simple update hint on every command for select commands like src extensions publish etc. but doing it on every command means that the tool would phone home on every command which is not ideal esp. if running the tool e.g. as part of a script.

@ryan-blunden ryan-blunden changed the title Package managers Automated upgrading Oct 19, 2018
@ryan-blunden
Copy link
Contributor

@slimsag I propose we include this in the extensions beta milestone

This suggestion from Felix I think is the most essential work to be done.

What would also help is an in-app update check that checks against the GitHub releases API for the latest release and notifies if an update is available, and prints an update command to run. I'm just worried users will miss out of features and bugfixes, especially related to extension publishing.

@slimsag
Copy link
Member

slimsag commented Oct 19, 2018

Yep, agreed, can you create a tracking issue on sourcegraph-extension-api repository for this in our beta milestone?

@gleich
Copy link

gleich commented Mar 2, 2021

I would love to take a crack at this if y'all are still open to it. https://github.com/rhysd/go-github-selfupdate seems perfect for this.

@gleich
Copy link

gleich commented Mar 2, 2021

Hmm seems as though this is already covered by #441

@mrnugget
Copy link
Contributor

mrnugget commented Mar 2, 2021

@Matt-Gleich I think that depends on @joshuabezaleel and whether he wants to finish #441 or not. I left some comments, some of which are blockers.

@joshuabezaleel
Copy link

Hi @Matt-Gleich and @mrnugget , I am truly sorry for a really late response to the discussion and the review since various personal things happened recently. If it would still be okay I would love to still continue working on the issue and PR. Will try to check it in the following days.

Would that be okay with you @Matt-Gleich ? 🙂

@gleich
Copy link

gleich commented Mar 5, 2021

Sounds good to me!

@mrnugget
Copy link
Contributor

Just a little update: we've closd #441 just now. We've been meaning to pick it up and carry it over the finish line for a while now, but it never had the right priority. If someone wants to either finish #441 (see review comments I left there) or open another PR that's in line with what was discussed in #441: please do!

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

6 participants