feat: support --prerelease in install scripts#35
Merged
Conversation
Add an opt-in --prerelease (install.sh) / -Prerelease (install.ps1) flag that installs the newest release overall, including prereleases, by resolving the version from the GitHub releases list endpoint instead of releases/latest. Default behavior is unchanged. Also documents the option in README.md and specs/install.md. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
qianwens
approved these changes
Jun 17, 2026
galiacheng
approved these changes
Jun 17, 2026
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.
Summary
install.shandinstall.ps1always installed the latest stable release because both called the GitHub APIreleases/latestendpoint, which excludes prereleases. This adds an opt-in flag to install the latest prerelease.Changes
scripts/install.sh— adds an argument-parsing loop supporting--prereleaseand-h/--help(unknown args error out). When--prereleaseis set, resolves the version from/releases?per_page=1(newest release overall, including prereleases) instead of/releases/latest.scripts/install.ps1— adds a[switch]$Prerelease(single capital P, matching the PowerShell-AllowPrereleaseconvention). When set, fetches the releases list endpoint and takes the first entry.README.md— short> [!TIP]notes showing how to request a prerelease from each one-liner.specs/install.md— documents the prerelease option and which endpoint each mode uses.Default (no-flag) behavior is unchanged.
Testing (manual, live GitHub API)
install.ps1 -Prerelease(Windows)1.0.51-beta.1+windows_x64.zip✅install.ps1(default)1.0.15✅install.sh --prerelease(full e2e in WSL)1.0.51-beta.1+linux_x64.tar.gz✅install.sh(default, WSL)1.0.15✅install.sh --prerelease(full e2e on macOS)1.0.51-beta.1+darwin_arm64.tar.gz✅install.sh(default, macOS)1.0.15+darwin_arm64.tar.gz✅install.sh --helpinstall.sh --nope