fix(scaffold): align v4 preview CD versioning#16232
Conversation
❌ VscUse Test Plan — Tests unknownWhy these tests: All changed files are CI/CD scripts, GitHub workflows, and distribution config/tests — trivial/infra changes with no vscode template modifications, so only 2 smoke plans are selected. Branch diff: Plans run:
ℹ️ How were these tests selected?GitHub Copilot (Claude Sonnet 4.6, high reasoning) analysed the PR title, description, and the diff between |
E2E Test Selection — AI SelectedWhy these tests: fx-core templateConfig.ts changes (rule 1) and the general-purpose generateV4Zip.js template script trigger teamsApp/, teamsAgent/, declarativeAgent/, and feature/multienv coverage; .github scripts are infra-only (rule 9) and excluded. Cases selected (21):
Need to run more tests?Comment on this PR:
Then re-run the workflow. |
❌ VscUse Test Plan — Tests unknownWhy these tests: All changed files are CI/infra scripts and internal distribution config (no templates/vscode/** or packages/vscode-extension/** paths), so this qualifies as trivial/infra — returning 2 smoke plans only. Branch diff: Plans run:
ℹ️ How were these tests selected?GitHub Copilot (Claude Sonnet 4.6, high reasoning) analysed the PR title, description, and the diff between |
There was a problem hiding this comment.
Pull request overview
This PR aligns v4 template publish/versioning behavior with the VSIX “preview” version minting rules so that preview template builds minted off an even-minor stable base publish into the next odd-minor, date-stamped lane (e.g., 6.10.x-beta.<date> → 6.11.<date>), keeping the v4 channel’s version/range/floor metadata consistent across scripts and fx-core.
Changes:
- Update
computeV4PublishVersionto bump even-minor preview bases to the next odd minor and stamp the build date into the patch. - Make v4 template range computation follow the published (clean) version rather than the raw minted version.
- Update CD/build scripts and unit tests to reflect and validate the new versioning behavior.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
templates/scripts/generateV4Zip.js |
Updates the build-time v4 publish version computation used for floor.json and templates.zip packaging. |
packages/fx-core/tests/v4/distribution/templateConfig.test.ts |
Adjusts/adds tests to validate even-minor preview → odd-minor date-stamped behavior and the resulting config/range. |
packages/fx-core/src/v4/distribution/templateConfig.ts |
Updates canonical publish version and range logic used to generate v4 template distribution config. |
.github/scripts/v4/sync-v4-template-config.js |
Keeps the build-independent CD “sync v4 config” script aligned with the canonical publish version/range behavior. |
.github/scripts/v4/publish-v4-channel.sh |
Simplifies publish invariants to rely on the synced v4.localVersion as the single source of truth for the clean publish version. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #16232 +/- ##
=======================================
Coverage 86.46% 86.46%
=======================================
Files 624 624
Lines 31816 31817 +1
Branches 7437 7438 +1
=======================================
+ Hits 27509 27510 +1
Misses 2479 2479
Partials 1828 1828
🚀 New features to boost your workflow:
|
❌ VscUse Test Plan — Tests failureWhy these tests: All changed files are infra/CI/versioning scripts (.github/scripts, packages/fx-core/src/v4/distribution, templates/scripts) with no template or VS Code extension changes, so only 2 smoke plans are selected as a basic sanity check. Branch diff: Plans run:
ℹ️ How were these tests selected?GitHub Copilot (Claude Sonnet 4.6, high reasoning) analysed the PR title, description, and the diff between |
Summary
Validation
cd packages/fx-core && npx vitest run --config vitest.config.ts tests/v4/distribution/templateConfig.test.tsAffected tests green.