Skip to content

feat: pin the install script to the requested version - #127

Draft
fengmk2 wants to merge 4 commits into
mainfrom
pin-install-script
Draft

feat: pin the install script to the requested version#127
fengmk2 wants to merge 4 commits into
mainfrom
pin-install-script

Conversation

@fengmk2

@fengmk2 fengmk2 commented Aug 17, 2026

Copy link
Copy Markdown
Member

The action always installed vp with the latest install.sh, so an install-script change like the XDG directory layout in voidzero-dev/vite-plus#2346 could break installing older versions.

The script is now fetched from the git ref matching the requested version:

  • Exact versions (0.2.9, 0.1.21-alpha.7): the v<version> release tag on raw.githubusercontent.com, with jsDelivr as an independent mirror (both verified to serve packages/cli/install.sh back to v0.1.0).
  • pkg.pr.new preview builds (0.0.0-commit.<sha>): the script from that exact commit, so a preview build always installs with the script it was built with.
  • Dist-tags (latest, next): unchanged, the latest script matches whatever they resolve to.

If all pinned sources fail (missing tag, mirror outage), the install warns and falls back to the latest script, so availability degrades to the previous behavior instead of blocking CI. Worst case for pinned versions is 8 attempts across 4 URLs instead of 4 across 2.

The URL selection is shared in src/ci/install-script-urls.ts and applied to the GitHub action, the Azure runtime, and the GitLab bootstrap.

Select install.sh/install.ps1 from the git ref matching the requested
version: the v<version> release tag for exact versions, the commit itself
for pkg.pr.new preview builds. The latest script tracks the latest CLI and
can break installs of older versions (e.g. the XDG directory-layout switch
in voidzero-dev/vite-plus#2346). Dist-tags keep using the latest script.
When the pinned sources are exhausted (missing tag, mirror outage), fall
back to the latest script with a warning so CI is not blocked.

The URL selection is shared in src/ci/install-script-urls.ts and applied
to the GitHub action, the Azure runtime, and the GitLab bootstrap.
@fengmk2

fengmk2 commented Aug 17, 2026

Copy link
Copy Markdown
Member Author

@codex review

@fengmk2 fengmk2 self-assigned this Aug 17, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: d53fab27eb

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Replace the urlGroups/groupIndex indirection with a tryUrls helper called
for the pinned then latest URL groups, matching the shape of the GitLab
bootstrap. Merge the redundant release-tag and commit-build URL tests into
one parametrized test and drop a double cast in the Azure test.
Split long sentences, use active voice, and remove em dashes in the
comments and fallback warnings added by this branch.
Resolve the newest 0.0.0-commit.<sha> build from the registry bridge and
install it via the version input on ubuntu and windows, so the
commit-pinned install script path is covered end-to-end.
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