chore: automate Rust crate versioning in publish-ci#7425
Draft
chore: automate Rust crate versioning in publish-ci#7425
Conversation
Add build/publish-rust.mjs to bump the microsoft-fast-build Rust crate version based on conventional commits since the last Beachball tag, then package the crate into publish_artifacts/cargo/. Address review comments from PR #7373: - Use publish_artifacts/cargo/ (covered by existing .gitignore entry) - Align tag format documentation to underscore convention - Run Rust script before beachball to capture Cargo.toml bump in commit - Use git tag --list for tag discovery instead of version construction Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.
Pull Request
📖 Description
When
npm run publish-ciruns, it now also handles themicrosoft-fast-buildRust crate automatically via a newbuild/publish-rust.mjsscript.This is a revised version of #7373 that addresses all review comments.
Changes
build/publish-rust.mjs(new)A Node.js script that:
microsoft-fast-build_v*usinggit tag --list --sort=-version:refname, falling back to all history if none existscrates/microsoft-fast-build/since that tagBREAKING CHANGE/feat!:/fix!:/refactor!:/chore!:→ majorfeat:→ minorcrates/microsoft-fast-build/Cargo.tomlcargo packageand copies the.cratefile topublish_artifacts/cargo/package.jsonUpdated
publish-cito run the Rust script before beachball:build/README.mdandbuild/DESIGN.md(new)Added documentation for the build utilities workspace.
Behavior
crates/microsoft-fast-build/publish_artifacts/cargo/This mirrors the existing pattern: beachball →
publish_artifacts/(npm), new script →publish_artifacts/cargo/(Rust).Review comments addressed from #7373
refactor!:,chore!:)publish_artifacts_cargo/topublish_artifacts/cargo/(covered by existing.gitignoreentry forpublish_artifacts/){package-name}_v{version}(underscore) format throughoutCargo.tomlversion bump is captured in the commitgit tag --list --sort=-version:refnameinstead of constructing tag from Cargo.toml version🎫 Issues
Supersedes #7373
👩💻 Reviewer Notes
No
.gitignorechanges are needed becausepublish_artifacts/is already ignored andpublish_artifacts/cargo/falls under that pattern.The script runs before beachball in
publish-ciso the Cargo.toml version bump is included in the beachball commit.📑 Test Plan
npm run buildsucceeds✅ Checklist
General
$ npm run change⏭ Next Steps