git-town icon indicating copy to clipboard operation
git-town copied to clipboard

auto-updating

Open kevgo opened this issue 6 months ago • 2 comments

Lots of tickets come from users using outdated Git Town binaries. It would be nice to get at least a notification that an update is available. Bonus points for getting confirmation to auto-update, and then actually doing it.

Possible technologies:

  1. https://github.com/minio/selfupdate
  2. https://github.com/sanbornm/go-selfupdate

kevgo avatar May 28 '25 19:05 kevgo

Alternative implementation::

  • Git Town client connects to a Git Town server
  • the Git Town server replies with the latest published version
  • the client checks whether it has this version and performs an update if necessary

kevgo avatar Jun 12 '25 21:06 kevgo

Suggestion: We don't need to run another server. We can use the GitHub API to check the latest version.

https://www.reddit.com/r/github/comments/1666bck/comment/jyi99un/

stephenwade avatar Jun 13 '25 17:06 stephenwade

I don't think I've encountered any CLIs that auto update themselves - leaning towards just displaying a prompt for new versions after running a CLI command. Would auto-updating the binary place nice with package registries as well (e.g. Homebrew)? I'm thinking it might change the binary hash and cause problems 🤔 .

tranhl avatar Jul 15 '25 05:07 tranhl

Good point! Changing this ticket to notify about outdated versions.

kevgo avatar Jul 22 '25 16:07 kevgo

This would only make sense when not installed via a package manager. Which cannot be detected reliably. Probably not worth it.

kevgo avatar Oct 17 '25 20:10 kevgo