Repository navigation
feat(update): add standalone updater - #377
Merged
Merged
Conversation
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.
Standalone Red installations currently have no supported in-place update path, so users must manually rerun an installer and the editor cannot surface new stable releases.
This adds a managed updater for official standalone installs.
red update --checkreports newer stable releases, whilered updatedownloads the exact platform archive, verifies its published SHA-256 checksum, validates the staged binary, and replaces the installation under an exclusive lock. The editor exposes the same flow through:updateand Update Red, with a daily notification-only check that can be disabled through[updates] mode = "off". The shell and PowerShell installers now prevalidate binaries and write the receipt and stable lock file that establish updater ownership; Homebrew and source builds continue to receive actionable guidance for their own update path.How to Test
cargo test update::tests. Expect the managed-install success path, checksum-preservation path, lock exclusion, archive validation, and editor worker tests to pass.sh tests/installers/install-sh.sh. Expect the installer fixture to validate the candidate, write.red-install.tomland.red-update.lock, and preserve the lock inode on reinstall.cargo build --bin red, then runtarget/debug/red update --check. Expect either an available stable version or an up-to-date message without modifying the executable.target/debug/red updatefrom the development build. Expect an actionable unmanaged-install message and no executable replacement.target/debug/red, enter:update, and continue editing. Expect the update progress notification to resolve to the same actionable unmanaged-install message while the buffer remains responsive.Validation
cargo test --all-targets --all-featurescargo clippy --all-targets --all-features -- -D warningscargo fmt --all --check