Skip to content

Add self-update command#1

Merged
jonstjohn merged 3 commits into
mainfrom
add-self-update
Mar 10, 2026
Merged

Add self-update command#1
jonstjohn merged 3 commits into
mainfrom
add-self-update

Conversation

@rpunt
Copy link
Copy Markdown
Contributor

@rpunt rpunt commented Feb 24, 2026

Summary

  • Add command that downloads the latest release binary from GitHub Releases, sanity-checks it, and atomically swaps it into place
  • Add to check for updates without installing
  • Uses the public GitHub Releases API (no auth required) with 24-hour result caching
  • Update README installation instructions to match actual release archive names and document the update command

Test plan

  • Unit tests for version check logic (caching, staleness, dev build skipping, API errors)
  • Unit tests for self-update (happy path, already up to date, download failure, sanity check failure, staged file cleanup)
  • Manual test: reports available update
  • Manual test: downloads and replaces binary
  • Manual test: dev build skips update check gracefully

rpunt and others added 3 commits February 24, 2026 11:50
Adds `workload-exporter update` to download and install the latest
release binary, and `workload-exporter update --check` to check
without installing. Uses the GitHub Releases API (no auth required
for public repos) with 24-hour caching, atomic binary swap, and
sanity checking.
Fix download URLs to match actual release archive names and add
the update command documentation.
@jonstjohn jonstjohn merged commit 46fdd33 into main Mar 10, 2026
3 checks passed
@jonstjohn jonstjohn deleted the add-self-update branch March 10, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants