2 KiB
2 KiB
| name | description | compatibility |
|---|---|---|
| bump-version | Bump the SDK version after publishing a release. Reads the current version from src/Directory.Build.props, suggests the next minor version, and creates a pull request with the change. Use when asked to bump the version, prepare for the next release, or increment the version number. | Requires gh CLI with repo access for creating branches and pull requests. |
Bump Version
Bump the SDK version in src/Directory.Build.props after publishing a release and create a pull request with the change.
Process
Step 1: Read Current Version
Read src/Directory.Build.props on the default branch and extract:
<VersionPrefix>— theMAJOR.MINOR.PATCHversion<VersionSuffix>— the prerelease suffix (e.g.preview.1), if present
Display the current version to the user: {VersionPrefix}-{VersionSuffix} or {VersionPrefix} if no suffix.
Step 2: Determine Next Version
If the user provided a target version in their prompt, use it. Otherwise, suggest the next minor version with the same suffix pattern:
- Current
0.9.0with suffixpreview.1→ suggest0.10.0-preview.1 - Current
1.0.0with no suffix → suggest1.1.0 - Current
1.2.3with suffixrc.1→ suggest1.3.0-rc.1
Present the suggestion and let the user confirm or provide an alternative. Parse the confirmed version into its VersionPrefix and VersionSuffix components.
Step 3: Create Pull Request
- Create a new branch named
bump-version-to-{version}(e.g.bump-version-to-0.10.0-preview.1) from the default branch - Update
src/Directory.Build.props:- Set
<VersionPrefix>to the new prefix - Set
<VersionSuffix>to the new suffix, or remove the element if there is no suffix
- Set
- Commit with message:
Bump version to {version} - Push the branch and create a pull request:
- Title:
Bump version to {version} - Label:
infrastructure - Base: default branch
- Title:
Step 4: Confirm
Display the pull request URL to the user.