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

Version check on start and potential self-upgrade? #10

Open
calmcacil opened this issue Oct 4, 2023 · 3 comments
Open

Version check on start and potential self-upgrade? #10

calmcacil opened this issue Oct 4, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@calmcacil
Copy link
Contributor

Since github provides a nice and clean way to get the latest version from api, maybe add a version check on update? Simply printing something along the lines of an orang text line under the puddler ascii reading something like.
Version (Running Version), latest release (Latest upstream release)

Bonus points for eventually adding U as a command that shows up in the list to update from github directly, but I am not sure that's something you can easily do, just letting users know there's a new version and making the U prompt take them to the latest release is probably good enough.

@calmcacil calmcacil changed the title Self update check on start? Version check on start and potential self-upgrade? Oct 4, 2023
@calmcacil
Copy link
Contributor Author

This crate seems like it would actually do exactly what you might want for updating in place, i could be wrong though, but worth a look.

https://docs.rs/self_update/latest/self_update/

@Vernoxvernax Vernoxvernax added the enhancement New feature or request label Oct 4, 2023
@Vernoxvernax
Copy link
Owner

Thank you for the resources you provided.

I can tell, how useful this feature could be, but there are a few things about would come from it that I really hate.

  • Hardcoding
    • I really hate to burn dependencies (f.e. repository url) like this into the code. It makes forking it a lot harder, since all of these things would have to be changed to make the code fully functional in a different repository.
  • Privacy / Complexity
    • Then there is the thing about privacy. Sure, auto-checking would be an optional setting, but firstly, we already got a few of those, and secondly, it would add another, not so insignificant, layer to the program. Also bugging github every time someone starts the script doesn't seem very effective for me. (so save the time of the latest check in the configuration?!)

I will keep this issue open, until I've made a decision.

@calmcacil
Copy link
Contributor Author

Handling the concern of hard coding repo urls and privacy under the same idea here. How about enabling auto updates by defining the repo url in the config? combined with using timestamps as a config value for when the last check was and only checking it if its been a while since it last checked? Not that im concerned that hitting github on startup would cause enough concern to actually worry about since plenty of people use scripts for updating that hit those api's to begin with.

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

2 participants