git-town
git-town copied to clipboard
auto-updating
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:
- https://github.com/minio/selfupdate
- https://github.com/sanbornm/go-selfupdate
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
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/
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 🤔 .
Good point! Changing this ticket to notify about outdated versions.
This would only make sense when not installed via a package manager. Which cannot be detected reliably. Probably not worth it.