Skip to content
This repository was archived by the owner on Oct 4, 2023. It is now read-only.

[C-815] Fix electron update#1717

Merged
sliptype merged 4 commits into
mainfrom
sk-fix-electron-update
Aug 15, 2022
Merged

[C-815] Fix electron update#1717
sliptype merged 4 commits into
mainfrom
sk-fix-electron-update

Conversation

@sliptype

@sliptype sliptype commented Aug 15, 2022

Copy link
Copy Markdown
Contributor

Description

  • Use app.getPath('appData') instead of app.getAppPath to store/retrieve the update builds because app.getAppPath can't apparently be modified when the app is built using electron-build (it's packaged into a single file)
  • On initial build registration, conditionally register the build located in the app data directory (if an update has been previously applied)
  • Update logic of replacing builds on update because they are now stored in a different location

For some reason the packages/web path was not being accounted for, did something change the structure of the s3 bucket?

  • Add appDataPath helper

Dragons

I would like to test this on windows. Does anyone have a windows machine to test on?

Also need prevent auto updater from downloading full update if only a patch version is required (still think this is happening), will address in separate pr

How Has This Been Tested?

Tested via npm run electron:stage and npm run dist:stage

How will this change be monitored?

For features that are critical or could fail silently please describe the monitoring/alerting being added.

Feature Flags

Are all new features properly feature flagged? Describe added feature flags.

if (
fs.existsSync(path.resolve(app.getAppPath(), `web-update/${buildName}`))
) {
const buildPath = appDataPath(`web-update/packages/web/${buildName}`)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why packages/web wasn't needed before?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤯

@audius-infra

Copy link
Copy Markdown
Collaborator

Preview this change https://demo.audius.co/sk-fix-electron-update

@sliptype sliptype merged commit e215be3 into main Aug 15, 2022
@sliptype sliptype deleted the sk-fix-electron-update branch August 15, 2022 22:48
sliptype added a commit that referenced this pull request Aug 18, 2022
* Add extends null

* Use getPath to locate update builds instead of getAppPath

* Remove extends null

* Fix typo
@sliptype sliptype mentioned this pull request Aug 18, 2022
@AudiusProject AudiusProject deleted a comment from linear Bot Sep 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants