Hazel: Lighweight update server for Electron apps
github.com
github.com
.
And a more practical one: do they not teach people about how power management works anymore? Who thinks this is a good idea...?
Refreshes the cache every 15 minutes (use INTERVAL environment value for custom number of minutes - more)
Do you update your app every 15 minutes? And are you presumptuous enough to assume your users need each update immediately? Maybe you simply just not care for users' devices' battery lives? If you really insist on the NIH approach to updates, check at app launch time, or once every 24 hours at most for long-running apps..and then
Automatically detects the platform/OS of the visitor by parsing the user agent
When did it become OK to trust user agent strings for feature or device detection?I never really understood the complaint against this. UA string detection is good enough 99.99% of the time and sure it's not trustworthy in the sense that the end user can mess with it, but so what? If the user is messing with the the string they know what they're doing.
I don't believe you, show me the data to back up such assumption.
I don't think you quite understand that this project is the server side, so the every 15 minute update frequency (which is user configurable) controls how often the server polls GitHub.
He could register a webhook for ReleaseEvent [0]. To make the process fault-tolerant, he could also have a daily check.
[0] https://developer.github.com/v3/activity/events/types/#relea...
It just sits between the app looking for an update and Github releases; returns the latest release if newer than a supplied version number assumed to be the current.
Is it really so bad to have that `if latest.version > version` logic in the app itself, and download directly from Github?
Github releases are presumably pushed over a CDN and already well-cached - and almost certainly have better up-time than someone running an instance of this somewhere, which of course is still potentially victim to Github's down-time.
Have I missed something? What's the point?
I've been running nuts on Heroku for my Electron app and never got it fully working. (It was very good at being able to tell there was an update available, but performing the update wouldn't work)
Does it work for Linux AppImage installs?
Also, I bet it's far easier to write an auto-updater than it is to figure out each OS's update method (building a deb,rpm,etc)
Write some POS 'blindly overwrite files, no you can't downgrade, what do you mean "changelog"' updater?
Sure, I bet you can do.
Write something that handles user preferences, changed config files, conflicts etc as well as apt/dpkg? I doubt it.