Progress
- Opened my third PR: Seamless-Updates - added flow for automatic updates for releases by AliceHincu · Pull Request #10857 · laurent22/joplin · GitHub
- Here I also solved the problem mentioned in the last weekly update (where the custom logic for setTimeout & logger couldn't be integrated in my service).
- I also wrote the code that handles the flow for automatic updates for prereleases, which will be included in another PR.
- Used an existing feature flag for checking if prereleases should be considered when the user wants to be notified about an update.
While testing, I noticed a problem with Electron's autoUpdater: if the prereleases are allowed, the autoUpdater will compare the versions semantically. When comparing versions semantically, the standard versioning scheme is based on Semantic Versioning which follows the format MAJOR.MINOR.PATCH . So instead of looking at the latest version number for desktop, it will look at "ios-v13.1.3", since this is a monorepo and all pre-releases are combined in one place.
The solution of this problem is to have two different flows:
- the normal flow: prereleases are not allowed, let Electron's autoUpdater work normally. I opened a PR for this.
- the manual flow: prereleases are allowed, so we need to fetch the latest desktop prerelease, get the latest.yml file based on the user's platform, and give Electron the link to that file. I will open a PR for this after merging the other one
Plans
- I want to make sure that fetching the latest version will work correctly before continuing with the actual update. I will focus on these two PRs.
- I want to look at VSCode to see the flow of updates:
- are updates installed automatically on app quits ?
- should Electron's autoUpdater install the update before asking the user if he/she wants to update the app? (I would like to only install the update after the user agrees to it)
Problems
- Joplin doesn't generate the latest.yml file for MacOS. I have to see where exactly is the problem.
- I mentioned in another post the problem of Electron not stopping after the app is closed. I noticed while coding, that in Task Manager the CPU reached 100% and there were multiple Electron apps opened - which is not ok at all and this should also be fixed in this PR.