Repository navigation
Desktop: the app updates itself on Windows (D38) - #53
Merged
Merged
Conversation
Once a day, and from Help, Check for Updates…, the app asks GitHub for the latest release, naming itself and its version and sending nothing else. A newer version shows "Update to …" in the title bar, with what is new, Update and restart, Later, and Skip this version. Help, Check for Updates Automatically turns the daily check off; About says when it last ran. Update and restart, where Setup installed the app, downloads the release's installer, checks its SHA-256 against the release's checksums.txt and deletes it on a mismatch, saves the tabs, starts Setup silently with /relaunch=yes, and closes. Setup's new [Run] line opens the new version only when /relaunch=yes is passed, so Setup run by hand is unchanged. A copy not installed by Setup, and macOS and Linux, offer the download page. internal/sources/github is the one place the app talks to GitHub; internal/update compares versions, cleans the release notes, downloads, checks and starts Setup. The website's install page gains Updating the app, and the home page and README mention Reader tabs and updating.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fdc517dcee
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
GoReleaser writes checksums.txt in the release job, before the Windows installer is built and attached, so v0.4.3's checksums do not list it and every update would have failed its check. The release workflow now adds the installer's SHA-256 to checksums.txt and uploads it again, replacing any line from an earlier run. The app reads the checksums when it checks, and offers a release that does not list its installer as a download instead.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The desktop app now checks for new versions, and on Windows installs them itself.
What the person sees
How it is built
internal/sources/github: the one place the app talks to GitHub.Filiation/<version>, and nothing else is sent.internal/update:dev;%LOCALAPPDATA%\filiation\updates, deleting older downloads;checksums.txt, deleting the file on a mismatch;/VERYSILENT /SUPPRESSMSGBOXES /NORESTART /CLOSEAPPLICATIONS /relaunch=yes.internal/ui:GET /api/update,POST /api/update/download,GET /api/update/status,POST /api/update/cancelandPOST /api/update/install. None of them needs a library open.desktop/main.go: builds the updater. "Installed by Setup" meansunins000.exesits beside the exe.main.updateAPIcan be set with-ldflagsfor test builds only.filiation.iss: a new[Run]line opens the app after a silent install, only when/relaunch=yesis passed. Setup run by hand is unchanged.docs/STATUS.md, the website's install page ("Updating the app"), and the home page and README mention Reader tabs and updating.Checked
.iss. macOS and Linux are untested.Versions 0.4.3 and earlier don't have this, so they update by hand once.