fix(installer): make beta opt-in, default to stable channel#39
Merged
Conversation
The install scripts resolved the version from /latest.json, which (until a stable release exists) synthesized the newest prerelease — so the default `curl … | sh` was silently installing betas. Pair the proxy's new channel support (get.devicecloud.dev now serves stable on /latest.json and prereleases on ?channel=beta) with explicit opt-ins: - DCD_BETA — request the beta channel (latest prerelease). - DCD_VERSION — already pins an exact version; documented for rollback. - Default (no opt-in) installs the latest *stable* only. When no stable release exists yet, the installer errors with guidance pointing at DCD_BETA / DCD_VERSION instead of falling back to a beta. The manifest fetch is separated from parsing so a transient network/proxy failure (curl -f non-zero) is reported differently from a channel that has no release yet (HTTP 200 with "version": null). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
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.
Problem
The default
curl -fsSL https://get.devicecloud.dev/install.sh | shwas installing beta versions. The installer resolves the version from the proxy's/latest.json, which — until a stable release exists — synthesized the newest prerelease. With onlyv5.0.0-beta.*published, every default install got the beta.Fix
Pairs with the proxy's channel support already on
dev(infraget-devicecloud-dev:/latest.json→ newest stable only;?channel=beta→ newest prerelease). The installers (install.sh,install.ps1) now:DCD_BETA— opt in to the beta channel (latest prerelease).DCD_VERSION— pin an exact version, e.g. for rollback (already existed; now documented as such and surfaced in guidance).Default installs the latest stable only. When no stable release exists yet, it errors with guidance rather than silently falling back to a beta:
Precedence:
DCD_VERSION>DCD_BETA> latest stable.The manifest fetch is split from parsing so a transient network/proxy failure (
curl -fnon-zero) reports differently from a channel that has no release yet (HTTP200with"version": null).Testing
Ran
install.shagainst a local mock of the proxy:DCD_BETA=1→ resolves and installs5.0.0-beta.1. ✓DCD_VERSION=5.0.0-beta.1→ installs the pinned version. ✓sh -n install.shpasses.install.ps1mirrors the same logic (pwsh unavailable locally; validated by review).🤖 Generated with Claude Code