From c861dc1b9cb50ab0a675e3f06792c43344acb586 Mon Sep 17 00:00:00 2001 From: distroinfinity Date: Wed, 27 May 2026 20:26:33 +0530 Subject: [PATCH] chore(cli): bump to 0.2.10, drop dead TARBALL_URL, consolidate changelog --- gitbook-docs/cli/releases.md | 15 +++++---------- packages/cli/package.json | 2 +- packages/cli/src/lib/auto-update.ts | 4 ++-- 3 files changed, 8 insertions(+), 13 deletions(-) diff --git a/gitbook-docs/cli/releases.md b/gitbook-docs/cli/releases.md index 0c5bf791..5a63f886 100644 --- a/gitbook-docs/cli/releases.md +++ b/gitbook-docs/cli/releases.md @@ -107,20 +107,15 @@ wild keep working when the Vercel challenge isn't firing. 3. Watch the Actions tab; the Release CLI workflow should produce the release. 4. Verify `https://github.com/distroinfinity/devdrip/releases/latest/download/distrotv-cli.tar.gz` returns the tarball. -## cli-v0.2.11 (2026-05-27) - -**Changed:** version check moved from GitHub Releases API to our own server. +## cli-v0.2.10 (2026-05-27) -- **server-driven update check:** the daemon (and `distro upgrade` / `distro status`) now calls `GET /cli/version-check?current=` on the Distro TV API instead of polling `api.github.com/repos/.../releases/latest`. The server returns `{ latest, outdated, tarballUrl }`; the CLI downloads the server-provided `tarballUrl` (still a GitHub Releases asset). -- **`LATEST_CLI_VERSION` rollout control:** the API env var gates whether any client sees an update. Unset → `outdated: false` (safe default, nothing auto-updates). Set to the released version → clients pick it up on their next tick. Unset or lower it to halt a rollout. -- **no version-check file cache:** the previous 7-day / 10-min local cache file was removed. The server call runs on the daemon's existing tick and is cheap. -- **`tar` bundled in tarball:** `tar` is now listed in tsup `noExternal` so it ships inside the release tarball. Previously it was resolved from `node_modules` at runtime and missing from the extracted bundle, which would have crashed the updater on a clean install. +First auto-update-capable release (bundles everything since 0.2.8, including the 0.2.9 health-check fix below). Two headline pieces: **CLI auto-update** and a **server-driven version signal**. -**Operational requirement:** after tagging a release, set `LATEST_CLI_VERSION=` on the Railway API service. Until that variable is set, no connected client auto-updates (intentional — gives you time to verify the build before rolling out). +**Server-driven update check:** the daemon (and `distro upgrade` / `distro status`) calls `GET /cli/version-check?current=` on the Distro TV API instead of polling GitHub. The server returns `{ latest, outdated, tarballUrl }` and gates rollout via the `LATEST_CLI_VERSION` env var — unset → `outdated:false` (safe default, nothing auto-updates); set to the released version → clients pick it up on their next tick; unset/lower it to halt a rollout. The old 7-day/10-min version-check file cache was removed. `tar` is bundled into the tarball (tsup `noExternal`) so the updater works on a clean install (it was previously external and missing from the artifact). -## cli-v0.2.10 (2026-05-27) +**Operational requirement:** after tagging the release, set `LATEST_CLI_VERSION=` on the Railway API. Until then no client auto-updates (intentional — verify the build first). -**Added:** CLI auto-update — the daemon now applies updates automatically on the ~15-min update-check tick instead of only nudging. +**Auto-update:** the daemon now applies updates automatically on the ~15-min update-check tick instead of only nudging. - **versioned install layout:** each release lands in `~/.distrotv/versions//`; `~/.distrotv/current` symlink points at the active version. Shims and Claude hook entries always resolve through `current/dist/index.js`, so a version swap is invisible to them. Legacy flat `~/.distrotv/dist` installs are self-migrated on first boot. - **pipeline:** download tarball → extract → `npm install` native deps in staging → verify (`--version` + `daemon self-check`) → atomic rename into `versions/` → repoint `current` → daemon restart. diff --git a/packages/cli/package.json b/packages/cli/package.json index 8cfe5b30..64e6f706 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -1,6 +1,6 @@ { "name": "@distrotv/cli", - "version": "0.2.9", + "version": "0.2.10", "private": false, "type": "module", "bin": { diff --git a/packages/cli/src/lib/auto-update.ts b/packages/cli/src/lib/auto-update.ts index a2aaa0b4..6cee580b 100644 --- a/packages/cli/src/lib/auto-update.ts +++ b/packages/cli/src/lib/auto-update.ts @@ -64,8 +64,8 @@ export async function verifyStaged( // ── Task 7: pipeline ───────────────────────────────────────────────────────── -export const TARBALL_URL = - "https://github.com/distroinfinity/devdrip/releases/latest/download/distrotv-cli.tar.gz" +// the tarball URL is supplied per-update by the server's /cli/version-check +// response (version-specific GitHub asset) — there is no hardcoded default. export const KEEP_VERSIONS = 1 export const BAD_VERSION_BACKOFF_MS = 60 * 60_000