Skip to content

fix(installer): make beta opt-in, default to stable channel#39

Merged
riglar merged 1 commit into
devfrom
fix/installer-beta-opt-in
Jun 24, 2026
Merged

fix(installer): make beta opt-in, default to stable channel#39
riglar merged 1 commit into
devfrom
fix/installer-beta-opt-in

Conversation

@riglar

@riglar riglar commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

Problem

The default curl -fsSL https://get.devicecloud.dev/install.sh | sh was 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 only v5.0.0-beta.* published, every default install got the beta.

Fix

Pairs with the proxy's channel support already on dev (infra get-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:

    error: No stable dcd release is available yet.
      Install the latest beta:  curl -fsSL https://get.devicecloud.dev/install.sh | DCD_BETA=1 sh
      Or pin a version:         curl -fsSL https://get.devicecloud.dev/install.sh | DCD_VERSION=5.0.0-beta.1 sh
    

Precedence: DCD_VERSION > DCD_BETA > latest stable.

The manifest fetch is split from parsing so a transient network/proxy failure (curl -f non-zero) reports differently from a channel that has no release yet (HTTP 200 with "version": null).

Testing

Ran install.sh against a local mock of the proxy:

  • Default (no opt-in) → strict error with the two opt-in commands, exit 1. ✓
  • DCD_BETA=1 → resolves and installs 5.0.0-beta.1. ✓
  • DCD_VERSION=5.0.0-beta.1 → installs the pinned version. ✓

sh -n install.sh passes. install.ps1 mirrors the same logic (pwsh unavailable locally; validated by review).

Note: the proxy serves install.sh/install.ps1 from the cli dev branch with a ~5-min cache, so this takes effect shortly after merge to dev.

🤖 Generated with Claude Code

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>
@claude

claude Bot commented Jun 24, 2026

Copy link
Copy Markdown

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

@riglar riglar merged commit 88c3532 into dev Jun 24, 2026
6 checks passed
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.

1 participant