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

autoupdates #104

Open
amonks opened this issue Apr 1, 2024 · 0 comments
Open

autoupdates #104

amonks opened this issue Apr 1, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@amonks
Copy link
Owner

amonks commented Apr 1, 2024

It's weird that people don't get skeeved out by autoupdates the way they do about "telemetry" (as they are effectively the same thing). But... that's fine! It means we can add autoupdates without fear of controversy.

ui

I'm picturing a statusbar widget with two states:

v1.0.0-beta.24
v1.0.0-beta.24 (update available; press u to install)

checking for updates

  1. what version am I running?
  2. what is the latest version?
  3. so… should I offer to update?

1 is easy; we already have this in meta.go.

2 would involve hitting the github releases API. Or maybe we put a proxy in front of that so we can get some telemetry? 😅.

3 is easy, too. We probably -don't ever- want to update if you're not running a release build (annoying in dev), and we probably -always- want to update if you are running a release build which is not latest.

If we put all of this in the TUI we don't have to care about avoiding updates in CI/prod use cases: they wouldn't use the TUI anyway so they are immune.

installing updates

I did this in https://github.com/amonks/piano-alone using https://github.com/inconshreveable/go-update, and it worked just dandy. It checks where the binary is installed and replaces it, so we don't have to think about PATH stuff like we would for an installer.

@amonks amonks added the enhancement New feature or request label Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant