Auto Update with electron-updater (WIP) #808
Labels
No labels
accessibility
app-parity
area: creator
area: daemon
area: design
area: devops
area: discovery
area: docs
area: installer
area: internal
area: livestream
area: performance
area: proposal
area: reposts
area: rewards
area: search
area: security
area: subscriptions
area: sync
area: ux
area: viewer
area: wallet
BEAMER
channel
comments
community PR
consider soon
core team
css
dependencies
electron
Epic
feature request
first-timers-only
good first issue
hacktoberfest
help wanted
hub-dependent
icebox
Invalid
level: 0
level: 1
level: 2
level: 3
level: 4
merge when green
needs: exploration
needs: grooming
needs: priority
needs: repro
needs: tech design
notifications
odysee
on hold
playlists
priority: blocker
priority: high
priority: low
priority: medium
protocol dependent
recsys
redesign
regression
resilience
sdk dependent
Tom's Wishlist
trending
type: bug
type: discussion
type: improvement
type: new feature
type: refactor
type: task
type: testing
unplanned
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: LBRYCommunity/lbry-desktop#808
Loading…
Reference in a new issue
No description provided.
Delete branch "auto-update"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
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.It might make sense to split the update logic into it's own file if it's not interacting with
main.js
much.main.js
is already a little big and cluttered.Mostly copy
"LBRY Will Upgrade"
"LBRY has a pending upgrade. Please select "Yes" to install it on the prompt shown after this one."
(Assuming this is correct, and that prompt isn't shown until I ACK this one).
This isn't necessarily a blocker, but is there a strong reason we have to expose
ipcRenderer
inside of a component, as well as put all of the handling of these events inside ofmain/index.js
? Could this component instead dispatch anAPP_QUIT
action, and a reducer could close the app? (Or the top-level component?)"Use It Now"
A new version of LBRY has been released, downloaded, and is ready for you to use pending a restart.
"Not Now" or "Upgrade on Restart"
@ -0,0 +26,4 @@
}}
>
<section>
<h3 className="text-center">{__("LBRY Leveled Up")}</h3>
I noticed a
<br/>
was dropped here.@ -0,0 +26,4 @@
}}
>
<section>
<h3 className="text-center">{__("LBRY Leveled Up")}</h3>
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?You are correct, and I'll update the wording (along with all of the other wording changes you mentioned)
I was going back and forth on this. Technically, neither of these IPC calls have anything to do with the store, and they do not lead to DOM updates. The "autoUpdateAccepted" IPC call tells the main process that it's time to shut down and restart (not UI state) and the "autoUpdateDeclined" IPC call just tells the main process to remember that the update was declined so that it can show the extra dialog on Windows (again, not UI state; the dialog is created by the main process and only appears after the app window is closed).
Is it typical to put code in Redux-land when it is only used for its side effects and doesn't affect anything going on in the browser window?
I think this is fine to leave as-is, at least for now.
@ -82,0 +82,4 @@
# 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
Wouldn't be better to change TeamCity config directly?
We should keep this. It was requested here https://github.com/lbryio/lbry-app/pull/933.
nit:
he
=>the
.Will
electron-log
be removed before merge?@ -68,7 +83,26 @@ app.on('activate', () => {
if (!rendererWindow) rendererWindow = createWindow();
});
nit: use a more descriptive name (http://airbnb.io/javascript/#naming--descriptive)
@ -68,7 +83,26 @@ app.on('activate', () => {
if (!rendererWindow) rendererWindow = createWindow();
});
Does this apply even to
e
? That has a standard meaning of "event," similar tox
,y
,i
, etc.If we want to be even more specific than "event," it would have to be
willQuitEvent
or something, which sounds redundantJust a merge error; will fix.
@ -82,0 +82,4 @@
# 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
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.
@ -68,7 +83,26 @@ app.on('activate', () => {
if (!rendererWindow) rendererWindow = createWindow();
});
I think
event
would fit best here. We don't have multiple events in this callback function so no need to specify precisely the event, and it would also be redundant as you pointed it out. Anyway, this is a nit.