Repository navigation
Closed
Labels
enhancementNew feature or requestNew feature or request
Description
Summary
get-stackql.io (the Cloudflare Worker in get-app/) always installs the latest release. Add an optional version argument, as a query param or a path segment, so a specific release can be installed. With no version given the behaviour is unchanged and the latest release is installed.
Current behaviour
RELEASE_BASEis hardcoded tohttps://releases.stackql.io/stackql/latestinget-app/src/index.ts, and every endpoint (/,/install,/install.sh,/install.ps1,/install/<provider>) builds its download URL from it.- The
fetchhandler only readsurl.pathnameand the User-Agent, so query strings are ignored.curl -fsSL "https://get-stackql.io/install?version=0.12.824"currently returns a script withbase="https://releases.stackql.io/stackql/latest". /install/0.12.824is routed as a cloud shell provider and returnsno cloud shell helper named '0.12.824'.- The generated
shand PowerShell installers take no arguments and read no env vars.
The download host already serves versioned paths, so this is a worker-only change:
| URL | Status |
|---|---|
https://releases.stackql.io/stackql/latest/stackql_linux_amd64.zip |
200 |
https://releases.stackql.io/stackql/0.12.824/stackql_linux_amd64.zip |
200 |
https://releases.stackql.io/stackql/v0.12.824/stackql_linux_amd64.zip |
404 |
Proposed usage
Query param:
curl -fsSL "https://get-stackql.io/install?version=0.12.824" | sh
curl -fsSL "https://get-stackql.io/install/aws?version=0.12.824" | sh
curl -sI "https://get-stackql.io/?version=0.12.824" # 302 to the versioned assetirm "https://get-stackql.io/install.ps1?version=0.12.824" | iexPath segment. /install/<segment> is already taken by cloud shell providers, so the version needs a position that doesn't collide, for example a leading segment:
curl -fsSL https://get-stackql.io/v0.12.824/install | sh
curl -fsSL https://get-stackql.io/v0.12.824/install/aws | sh
curl -sI https://get-stackql.io/v0.12.824 # 302 to the versioned assetirm https://get-stackql.io/v0.12.824/install.ps1 | iexThe path form needs no quoting. The query form does in zsh, where an unquoted ? is treated as a glob and fails with no matches found.
Supporting both is fine. They would resolve to the same internal version value.
Implementation notes
- Accept
0.12.824orv0.12.824and strip a leadingv. releases.stackql.io uses unprefixed versions (thevpath returns 404), while GitHub tags use thevprefix. - Validate against a strict pattern such as
^v?\d+\.\d+\.\d+$before using it. The value is interpolated into the served script, so arbitrary input must not be reflected. On an invalid value, serve a short error script in the caller's shell language, following the existing wrong-shell guards. - Treat
latestor no value as the current behaviour. - For the path form, strip a leading version segment before the existing routing runs (the cloud shell check currently expects exactly two segments).
- Turn
RELEASE_BASEinto a function of the version and pass it through toINSTALL_SH,INSTALL_PS1,providerInstallSh()and the/redirect. When a version is pinned,RELEASES_URLin error messages should point athttps://github.com/stackql/stackql/releases/tag/v<version>. - Older releases don't carry every asset.
v0.12.732and earlier have nostackql_windows_arm64.zip, and0.5.418has nostackql_linux_arm64.zip(404 on releases.stackql.io). The installerscurl -fsSL/Invoke-WebRequeststraight to the asset, so a missing version or asset currently surfaces as a raw HTTP 404. They should catch that and print something likestackql <version> has no <asset> - see <release url>. - Unknown versions can be handled the same way in the installer, or the worker could
HEADthe asset before serving the script. The installer-side check is simpler and keeps the worker free of subrequests. - Update
get-app/README.mdand the smoke tests (test-get-app.sh,test-get-app.ps1).
Acceptance criteria
- No version -> unchanged behaviour (latest).
0.12.824andv0.12.824both install 0.12.824 via/,/install,/install.sh,/install.ps1and/install/<provider>.- Invalid version strings are rejected with a readable message and are never echoed into the served script unsanitized.
- A version and architecture combination with no matching asset fails with a readable message, not a bare HTTP 404.
- Smoke tests cover a pinned version,
v-prefixed input, an invalid value and a missing asset.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request
Activity
jeffreyaven commentedon Nov 18, 2026
Resolved in PR #936, merged as 256187f.