Repository navigation
feat(build): pin the CWF release via cwf.version - #340
Merged
Merged
Conversation
cwf.ps1 now resolves the pinned version (cwf.version, or CWF_VERSION override), looks up releases/tags/v<version> and downloads the exact cs-webview-v<version>.zip asset instead of the first asset of releases/latest. The download is skipped when cs-cwf/.cwf-version matches and cs-cwf/index.js exists, and failures name the missing piece. The script is split into small functions with a single Main call. The cs-cwf.zip Makefile target depends on cwf.version, the -Token argument is dropped from the workflows (the token is read from the environment), and SETUP.md documents the pin.
|
Caution Review failedThe pull request is closed.
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
No application code in the PR — skipped Code Health checks.
See analysis details in CodeScene
Quality Gate Profile: Clean Code Collective
Install CodeScene MCP: safeguard and uplift AI-generated code. Catch issues early with our IDE extension and CLI tool.
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.
Summary
The extension build now pins the CWF (cs-webview) release instead of downloading whatever
releases/latesthappens to be. The pin lives in a committedcwf.versionfile at the repo root (currently2.5.8), so a CWF bump is a one-line, reviewable commit and builds are reproducible.Changes:
cwf.version: new file holding the pinned version (2.5.8)..github/cwf.ps1(without-Local):CWF_VERSIONenvironment variable if set, otherwise fromcwf.version. AcceptsMAJOR.MINOR.PATCHwith an optionalvprefix and rejects anything else.releases/tags/v<version>and downloads the exact assetcs-webview-v<version>.zip, rather than the first asset ofreleases/latest.cs-cwf/.cwf-versionafter a successful extract and skips the download when that stamp matches the requested version andcs-cwf/index.jsexists.cwf.version/CWF_VERSION, invalid version, missing token, release tag not found, asset not found, HTTP 401/403 hint about the token, extraction produced noindex.js).Maincall. The-Localpath (make updatecwf) behaves as before and stampscs-cwf/.cwf-versionwithlocal.Makefile: thecs-cwf.ziptarget now depends oncwf.version, so changing the pin re-triggers the download.github-release.yml,code-coverage.yml: the-Tokenargument is removed. The script already readsCODESCENE_IDE_DOCS_AND_WEBVIEW_TOKENfrom the environment, which both workflows set, so the argument was unused.SETUP.md: documents the pin and two limitations:CWF_VERSIONonly takes effect whencwf.ps1is run directly (Make does not see environment overrides), and returning to the pinned release aftermake updatecwfneedscwf.ps1run directly orcs-cwf.zipdeleted.Reasoning for reviewers
index.jsexistence check keeps repeat builds fast while still re-downloading if the extracted folder is incomplete or a different version.index.jsis verified, so an interrupted run never leaves a stamp that claims a good install.-Tokenwas dead: the script never consumed the parameter and read the env var instead, so removing it avoids implying that it is honoured.Test coverage
There is no automated test harness for
cwf.ps1in this repo. The change was QA-checked manually against the behaviours listed above. The CI workflows touched here exercise the real download path with the repo secret.Sibling PRs with the same change in codescene-vscode and codescene-jetbrains are independent.