Skip to content

Apply version bumps with a separate rush version --bump step - #490

Merged
Ian Clanton-Thuon (iclanton) merged 4 commits into
microsoft:mainfrom
iclanton:include-publish-flag
Sep 16, 2026
Merged

Ian Clanton-Thuon (iclanton) merged 4 commits into
microsoft:mainfrom
iclanton:include-publish-flag

Conversation

@iclanton

@iclanton Ian Clanton-Thuon (iclanton) commented Sep 16, 2026

Copy link
Copy Markdown
Member

Summary

The bump pipeline wasn't applying version bumps. The combined rush publish --apply --pack --include-all command never bumps versions: --include-all routes to Rush's "publish all" code path (PublishAction#publishAllAsync), which packs every project at its current package.json version and never calls changeManager.apply(). So the change files were ignored and nothing was bumped. Adding --publish doesn't help — on the --pack path that flag only affects git tagging.

Fix

Split versioning and packing into two explicit steps (mirroring how the rushstack repo bumps and packs separately):

  • bump-versions.yaml now runs rush version --bump, which applies the change files: bumps package.json versions, regenerates CHANGELOGs, updates inter-project dependency ranges, and deletes the consumed change files. --target-branch is deliberately omitted, so Rush performs no git operations of its own (every PublishGit operation is gated on a target branch being set) — the bumps land in the working tree and the pipeline commits them onto the feature branch.
  • New pack.yaml runs rush publish --pack --include-all to pack the freshly bumped packages into tarballs for the ESRP publish pipeline. Rush requires --include-all with --pack; packing unchanged projects is harmless because ESRP ignores tarballs whose version is already published.

Generated with the help of GitHub Copilot CLI.

"rush publish --apply --pack --include-all" does not apply version bumps:
"--include-all" routes to Rush's "publish all" code path, which packs every
project at its current package.json version and never calls changeManager.apply,
so the change files were ignored and nothing was bumped. Adding "--publish"
does not help, since the "--pack" path only uses that flag for git tagging.

Split the flow into two explicit steps, matching how the rushstack repo bumps
and packs separately:

- bump-versions.yaml now runs "rush version --bump", which applies the change
  files (bumps package.json versions, regenerates CHANGELOGs, updates
  inter-project ranges, deletes consumed change files). "--target-branch" is
  omitted, so Rush performs no git operations of its own (every PublishGit
  operation is gated on a target branch); the bumps land in the working tree and
  we commit them onto the feature branch.
- New pack.yaml runs "rush publish --pack --include-all" to pack the bumped
  packages into tarballs for the ESRP publish pipeline.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d79bf579-32e9-40b3-91b0-98e008c81849
@iclanton Ian Clanton-Thuon (iclanton) changed the title Add --publish flag to rush publish command to prevent a dry-run. Apply version bumps with a separate rush version --bump step Sep 16, 2026
Rush's pack step only runs "npm pack" and copies the tarball into the release
folder when "--publish" is set (shouldExecute: this.#publish.value in
PublishAction#npmPackAsync); without it the pack is a dry-run and produces no
tarballs. With "--pack" set, "--publish" does not publish to the registry --
Rush takes the pack branch, not the npm-publish branch -- so ESRP still performs
the real publish later. This matches the spfx repo's pack invocation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: d79bf579-32e9-40b3-91b0-98e008c81849
@iclanton
Ian Clanton-Thuon (iclanton) merged commit 2ca8c16 into microsoft:main Sep 16, 2026
6 checks passed
@iclanton
Ian Clanton-Thuon (iclanton) deleted the include-publish-flag branch September 16, 2026 01:16
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.

2 participants