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

Auto Update with electron-updater (WIP) #808

Merged
merged 36 commits into from Jan 24, 2018

Conversation

Projects
None yet
4 participants
@alexliebowitz
Collaborator

alexliebowitz commented Dec 4, 2017

Build is fixed now and the UI is practically done. The main issue is that I'm getting bug at the very end of the process: when I call appUpdater.quitAndRestart() to trigger the install, it closes the window but doesn't exit the app or do the install. Hopefully it won't be too hard to figure out.

@alexliebowitz alexliebowitz requested review from kauffj and IGassmann Dec 4, 2017

@alexliebowitz alexliebowitz changed the title from Auto Update (WIP) to Auto Update with electron-updater (WIP) Dec 4, 2017

Show outdated Hide outdated src/main/main.js
@kauffj

Mostly copy

Show outdated Hide outdated src/main/index.js
Show outdated Hide outdated src/main/index.js
Show outdated Hide outdated src/renderer/modal/modalAutoUpdateDownloaded/view.jsx
}}
>
<section>
<h3 className="text-center">{__("LBRY Leveled Up")}</h3>

This comment has been minimized.

@kauffj

kauffj Jan 8, 2018

Member

I noticed a <br/> was dropped here.

@kauffj

kauffj Jan 8, 2018

Member

I noticed a <br/> was dropped here.

This comment has been minimized.

@alexliebowitz

alexliebowitz Jan 9, 2018

Collaborator

There are other modals (most?) with no <br />, and it's not semantic, and seemed to look fine this way. What did you think of the look?

@alexliebowitz

alexliebowitz Jan 9, 2018

Collaborator

There are other modals (most?) with no <br />, and it's not semantic, and seemed to look fine this way. What did you think of the look?

Show outdated Hide outdated src/renderer/modal/modalAutoUpdateDownloaded/view.jsx
Show outdated Hide outdated src/renderer/modal/modalAutoUpdateDownloaded/view.jsx
Show outdated Hide outdated src/renderer/modal/modalAutoUpdateDownloaded/view.jsx

alexliebowitz added some commits Nov 18, 2017

Upgrade to electron-builder 19.45.5
It's not clear yet if this will be needed for the new upgrade process,
but we need to get on the latest version eventually anyway.
Add electron-log
The daemon and lbryum log all kinds of useful status/debug info, might
as well start doing that in the app too.
Upload assets for latest version to S3 in a separate directory
These are the assets that go in s3://releases.lbry.io/app/latest.
Included are the built asset used for updates (on Mac this is actually
a zip file, not the dmg), as well as the update metadata file for this
platform (latest.yml, etc.)

Also includes some refactoring in the update build script.
Add electron-publisher-s3 requirement
Needed for update system
Don't try to upload latest-linux.yml file on Linux
It's not being generated on Linux. I'm pretty sure this is a bug (or at
least undocumented behavior), but it's OK because Linux doesn't support
updates yet anyway.
Copy dmg file into dist/mac for TeamCity
TeamCity expects the dmg to be in dist/mac, but in the new
electron-builder it's put directly in dist/ (in the long run the right
way to solve this is to update the TeamCity config).
More core UI for auto-update
We keep the old dialog flow on Linux, and on Windows and Mac we show a
single dialog when the file is downloaded.
Make app actually quit for update
Before, it was just minimizing and the app wouldn't even update because
electron-updater expects to be able to close the app.
Convert Windows update alert dialog to native dialog in main process
Maybe a bit less polished, but I couldn't find a way to prevent the
main window from closing that works on the current version of Electron,
and in general it was starting to get too complicated.
Make app restart after user approves update
Forgot to call quitAndInstall(). If you don't, it will still install
the update, but won't restart.
# Workaround: TeamCity expects the dmg to be in dist/mac, but in the new electron-builder
# it's put directly in dist/ (the right way to solve this is to update the TeamCity config)
if $OSX; then
cp dist/*.dmg dist/mac

This comment has been minimized.

@IGassmann

IGassmann Jan 23, 2018

Contributor

Wouldn't be better to change TeamCity config directly?

@IGassmann

IGassmann Jan 23, 2018

Contributor

Wouldn't be better to change TeamCity config directly?

This comment has been minimized.

@alexliebowitz

alexliebowitz Jan 23, 2018

Collaborator

It would, but I figured we would worry about it later. It's already going to be a little complicated to roll out auto update.

@alexliebowitz

alexliebowitz Jan 23, 2018

Collaborator

It would, but I figured we would worry about it later. It's already going to be a little complicated to roll out auto update.

Show outdated Hide outdated package.json
Show outdated Hide outdated src/main/index.js
Show outdated Hide outdated src/main/index.js
Show outdated Hide outdated src/main/index.js

alexliebowitz added some commits Jan 24, 2018

Remove remaining traces of logging code from main/index.js
We might need this later, but right now no logging is happening here.

@liamcardenas liamcardenas merged commit 896a894 into master Jan 24, 2018

@lyoshenka lyoshenka deleted the auto-update branch Mar 25, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment