-
-
Notifications
You must be signed in to change notification settings - Fork 182
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
Automatic Update Checking #153
Conversation
the console logs will probably have to go anyway even though I think they are quite useful. But the current eslint config forbids using the console logging functions. (It also enforces CRLF line breaks despite the whole code base being LF only) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm glad to see from the code that this is a native dialog because my eyes were quite... shocked... by the screenshot in this PR.
91e5057
to
771ec74
Compare
Jup that's just a system dialog using my system's Adawaita Dark theme.
@ObserverOfTime I saw you are the maintainer of the AUR package.. since I don't know how the packaging works, do you have a suggestion on how it could be configured? I don't know what the goto way to do this is. |
You could introduce an environment variable like |
}); | ||
|
||
if (result.response === 0) { | ||
await shell.openExternal(latestRelease.html_url); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a thought, but should we take them to the release page, or should we go to the corresponding OS's asset download url?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm personally fine with either, the added complexity is minimal. but that would also require hard-coding (or at least semi-hardcoding) the filenames for the OS files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well it wouldn't have to be complete hardcoded could do something like:
let asset = assets.find(a => a.name.toLowerCase().includes("linux"); // Linux default
if (process.platform === "win32") asset = assets.find(a => a.name.toLowerCase().includes("windows");
else if (process.platform === "darwin") asset = assets.find(a => a.name.toLowerCase().includes("mac");
await shell.openExternal(asset.browser_download_url);
But I'm still not sure if that option is truly better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
An added bonus of linking the release page would be showing a changelog as well, even though though I expect most people to not read it.
And maybe we can put little text snippet on there after new releases that smart screen migtht pop up but it's fine or something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with that
@ObserverOfTime is the implementation here sufficient for your needs? |
Yes, we can just wrap the installer in a script with |
Thanks for the ping! I'll make sure to wrap it upon the next release :) |
@IvarWithoutBones The next release is available now :) |
Automatically checks if updates for the installer are available using the Github Releases API. Clicking on download will terminate the installer and open a the release page in the browser. It requires future release tags to be valid semver versions (optionally prefixed with
v.
). The current installer version is taken from the package.json. For testing purposes changing the version in the package json to something below 1.0.0 should trigger the prompt. The update checking is done asynchronously because I noticed a significantly increased startup time if it's done synchronously before the installer window starts.Implementation of the feature request from #151