-
Notifications
You must be signed in to change notification settings - Fork 5.1k
Consume SdkReleaseType in automation script to update package versions #53780
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: JoshLove-msft <[email protected]>
Co-authored-by: JoshLove-msft <[email protected]> Co-authored-by: JoshLove-msft <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds functionality to automatically update package version suffixes based on the SDK release type (beta or stable). The implementation includes a new Update-PackageVersionSuffix function that modifies .csproj files to add or remove beta version suffixes.
Key changes:
- Introduced
Update-PackageVersionSuffixfunction to handle version suffix updates based on release type - Integrated the function into the TypeSpec generation workflow to automatically update package versions
- Added comprehensive unit tests covering various scenarios including edge cases
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| eng/scripts/tests/Update-PackageVersionSuffix.tests.ps1 | New test file with comprehensive unit tests for the Update-PackageVersionSuffix function |
| eng/scripts/Invoke-GenerateAndBuildV2.ps1 | Added Update-PackageVersionSuffix function and integrated it into the TypeSpec generation workflow |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: JoshLove-msft <[email protected]>
|
/check-enforcer evaluate |
Description
Implements consumption of
SdkReleaseTypefrom input JSON to automatically manage package version suffixes in TypeSpec-generated SDKs. Previously, a warning was emitted when this field was provided; now it drives version updates.Changes
Added
Update-PackageVersionSuffixfunction ineng/scripts/Invoke-GenerateAndBuildV2.ps1:beta→ adds-beta.1suffix if not present (e.g.,1.0.0→1.0.0-beta.1)stable→ removes beta suffix (e.g.,1.0.0-beta.5→1.0.0)InnerTextproperty for robust csproj updatesAdded unit tests in
eng/scripts/tests/Update-PackageVersionSuffix.tests.ps1:Follows pattern established in PR #53750 (api-version consumption). Changelog updates are out of scope per issue requirements.
This checklist is used to make sure that common guidelines for a pull request are followed.
General Guidelines
Testing Guidelines
SDK Generation Guidelines
*.csprojandAssemblyInfo.csfiles have been updated with the new version of the SDK.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.