Skip to content

fix(install): skip extension-v* releases when picking latest CLI#148

Open
George-iam wants to merge 1 commit into
mainfrom
fix/install-skip-extension-releases-20260603
Open

fix(install): skip extension-v* releases when picking latest CLI#148
George-iam wants to merge 1 commit into
mainfrom
fix/install-skip-extension-releases-20260603

Conversation

@George-iam

Copy link
Copy Markdown
Contributor

Why

A user trying to install on a fresh box just now:

```
$ curl -fsSL https://raw.githubusercontent.com/AxmeAI/axme-code/main/install.sh | bash
Detected platform: linux-x64
Fetching latest release...
Installing axme-code extension-v0.1.5 (linux-x64)...
curl: (22) The requested URL returned error: 404
```

The installer picked the wrong tag: extension-v0.1.5 instead of v0.6.0. Then tried to download axme-code-linux-x64 from a release that only contains .vsix files → 404.

Root cause

We publish two parallel release tracks from this repo:

Tag pattern What ships
v* CLI binary releases (6 platform-specific files)
extension-v* VS Code / Cursor extension .vsix bundles (5 platform-specific files)

install.sh:30 and install.ps1:29 both hit /releases/latest, which returns the most-recently-published release across ALL tags. Today's release order — v0.6.0 at 09:25 UTC, then extension-v0.1.5 at 09:30 UTC — made the extension release "latest" 8 hours ago. Every fresh curl|bash install.sh call has 404'd since.

The bug has existed since we added the extension release track but only triggers when we publish in the order "CLI release first, then extension release." In v0.5.0 era we published extension releases before the CLI release (extension-v0.1.4 → v0.5.0 was reversed) so the issue was masked.

Fix

Switch both installers from /releases/latest to /releases?per_page=30 and filter for the first tag_name matching ^v[0-9]:

  • install.sh: curl ... | grep tag_name | sed ... | grep -E '^v[0-9]' | head -1
  • install.ps1: Invoke-RestMethod ... | Where-Object { $_.tag_name -match '^v[0-9]' } | Select-Object -First 1

Both pieces of logic carry a code comment explaining the two-track release model and the failure case so the next operator doesn't re-introduce it.

Verified

Dry-runned against the live API:

```bash
$ curl -fsSL "https://api.github.com/repos/AxmeAI/axme-code/releases?per_page=30\" \
| grep '"tag_name"' \
| sed 's/.*"tag_name": "//;s/".//' \
| grep -E '^v[0-9]' | head -1
v0.6.0
```

Workaround until this merges

End users can still install by passing the version explicitly:

```bash
curl -fsSL https://raw.githubusercontent.com/AxmeAI/axme-code/main/install.sh | bash -s v0.6.0

install.ps1: iwr ... | iex -ArgumentList v0.6.0

```

(Both installers already accept the version as the first positional argument — install.sh:56, install.ps1:60.)

After merge

No tag, no release needed. install.sh and install.ps1 are served via raw.githubusercontent.com/AxmeAI/axme-code/main/install.sh — the next curl|bash after merge will pick up the fix.

Test plan

  • AST/syntax: bash -n install.sh clean (no parse error introduced)
  • Live-API dry-run resolves to v0.6.0 correctly
  • After merge: another curl|bash install.sh on a fresh box installs v0.6.0 cleanly

🤖 Generated with Claude Code

install.sh and install.ps1 both hit /releases/latest, which returns the
most recently published release across all tracks. We publish two
parallel tracks from the same repo: `v*` for CLI binaries and
`extension-v*` for the .vsix bundles. Whenever an extension release is
the most recent, install.sh/install.ps1 picks that tag, builds a
download URL like `axme-code-linux-x64` against it, and 404s because
extension releases only ship `.vsix` files.

Today's release order (v0.6.0 first, then extension-v0.1.5 ~8 hours
later) tripped this exact case — every fresh `curl|bash install.sh`
call now returns 404 until we resolve the latest CLI release
correctly.

Fix: switch both installers from `/releases/latest` to
`/releases?per_page=30` and pick the first `tag_name` matching
`^v[0-9]`. Releases are listed by published_at DESC, so the first
match is the most recent CLI release. `extension-v*` tags are
skipped.

Verified against the live API: returns `v0.6.0`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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