fix(install): skip extension-v* releases when picking latest CLI#148
Open
George-iam wants to merge 1 commit into
Open
fix(install): skip extension-v* releases when picking latest CLI#148George-iam wants to merge 1 commit into
George-iam wants to merge 1 commit into
Conversation
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>
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.
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.5instead ofv0.6.0. Then tried to downloadaxme-code-linux-x64from a release that only contains.vsixfiles → 404.Root cause
We publish two parallel release tracks from this repo:
v*extension-v*.vsixbundles (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.0at 09:25 UTC, thenextension-v0.1.5at 09:30 UTC — made the extension release "latest" 8 hours ago. Every freshcurl|bash install.shcall 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/latestto/releases?per_page=30and filter for the firsttag_namematching^v[0-9]:curl ... | grep tag_name | sed ... | grep -E '^v[0-9]' | head -1Invoke-RestMethod ... | Where-Object { $_.tag_name -match '^v[0-9]' } | Select-Object -First 1Both 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 nextcurl|bashafter merge will pick up the fix.Test plan
bash -n install.shclean (no parse error introduced)v0.6.0correctlycurl|bash install.shon a fresh box installsv0.6.0cleanly🤖 Generated with Claude Code