feat: add self-update command with passive version checking#12
Conversation
Add `bugatti update` for manual updates and `bugatti update --check` for version checking. After successful test runs, a passive background check notifies users of available updates (rate-limited to 8h, TTY-only, opt-out via BUGATTI_NO_UPDATE_CHECK=1). Uses the GitHub releases redirect trick to avoid API rate limits. Downloads are verified via SHA256 checksums. On macOS, removes quarantine attributes and applies ad-hoc code signing after update. Also updates install.sh with secure_binary() and the redirect trick.
Code reviewFound 5 issues:
Lines 566 to 570 in a4e435c
Lines 175 to 179 in a4e435c
Lines 84 to 90 in a4e435c
Lines 186 to 198 in a4e435c
Lines 433 to 438 in a4e435c |
|
All 5 issues addressed in bc5334a:
|
Summary
bugatti updatecommand for manual self-update (download, SHA256 verify, extract, replace)bugatti update --checkfor version-only checkingbugatti testruns (rate-limited to 8h, TTY-only, opt-out viaBUGATTI_NO_UPDATE_CHECK=1)install.shwithsecure_binary()function and redirect-based tag fetchTest plan
cargo test— all 200 tests pass (12 new in update module)cargo clippy— cleancargo fmt --check— cleanbugatti update --check— correctly reports "up to date" against live GitHubbugatti update— end-to-end test against a real release (publish a test release first)bugatti update -y— non-interactive updatebugatti testwhen interval has elapsedBUGATTI_NO_UPDATE_CHECK=1suppresses passive checkinstall.shsecure_binary and redirect trick work on fresh install