Skip to content

feat: support --prerelease in install scripts#35

Merged
shizhMSFT merged 1 commit into
mainfrom
shizh/install_prerelease
Jun 17, 2026
Merged

feat: support --prerelease in install scripts#35
shizhMSFT merged 1 commit into
mainfrom
shizh/install_prerelease

Conversation

@shizhMSFT

@shizhMSFT shizhMSFT commented Jun 17, 2026

Copy link
Copy Markdown
Member

Summary

install.sh and install.ps1 always installed the latest stable release because both called the GitHub API releases/latest endpoint, which excludes prereleases. This adds an opt-in flag to install the latest prerelease.

Changes

  • scripts/install.sh — adds an argument-parsing loop supporting --prerelease and -h/--help (unknown args error out). When --prerelease is 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 -AllowPrerelease convention). 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)

Scenario Result
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 --help usage shown, exit 0 ✅
install.sh --nope usage + error, non-zero exit ✅

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>
@shizhMSFT shizhMSFT changed the title Support --prerelease in install scripts feat: support --prerelease in install scripts Jun 17, 2026
@shizhMSFT
shizhMSFT merged commit 60aa748 into main Jun 17, 2026
1 check passed
@shizhMSFT
shizhMSFT deleted the shizh/install_prerelease branch June 17, 2026 04:26
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.

3 participants