Repository navigation
fix(install): install the newest prerelease when there is no full release - #27
Merged
Merged
Conversation
…ease GitHub's /releases/latest skips prereleases, so while every release is a prerelease `curl install.sh | sh` stopped with "no published release found". A fresh install now falls back to the newest tag in the releases feed and says it is a prerelease; the update timer still only follows full releases and quietly stays put when there is none. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K4B4YKMC6fT9oWCCwWgt9S
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.
Before: GitHub's
/releases/latestskips prereleases. Releases ship as prereleases first, so the README one-liner (curl … install.sh | sh) would stop with "no published release found", and the daily update timer would fail every day.After: a fresh install falls back to the newest tag in the releases feed (
releases.atom, no API token) and says it's installing a prerelease. The update timer still follows only full releases, and when there is none it stays on the installed version without an error.How:
latest_versiontries/latestfirst. If that fails it falls back to the feed (install mode only), and its message goes to stderr so it isn't captured as the version. The caller treats an empty version as "nothing to update" in update mode and as an error in install mode.Test level:
sh -nandbash -n.latest_versionwas run under dash against a local fake release server in three states: full release, prerelease only, and no releases, each in install and update mode. All six cases give the expected tag or a clean exit. A real install on a Pi was not run.Generated by Claude Code