Add --what-if option to prepare-release command for simulating version changes#1242
Merged
Add --what-if option to prepare-release command for simulating version changes#1242
Conversation
Co-authored-by: AArnott <3548+AArnott@users.noreply.github.com>
Co-authored-by: AArnott <3548+AArnott@users.noreply.github.com>
AArnott
requested changes
Aug 10, 2025
Co-authored-by: AArnott <3548+AArnott@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Simulate the future version
Add --what-if option to prepare-release command for simulating version changes
Aug 10, 2025
…nd remove Array.Empty arguments Co-authored-by: AArnott <3548+AArnott@users.noreply.github.com>
AArnott
approved these changes
Dec 20, 2025
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.
This PR adds a
--what-ifoption to thenbgv prepare-releasecommand that allows users to simulate the prepare-release operation and see what versions would be set without actually making any git changes.What it does
The
--what-ifflag enables users to preview the results of a prepare-release operation before committing to it:Implementation
--what-ifoption: Added to the prepare-release command with appropriate help textSimulatePrepareReleasemethod: New method inReleaseManagerthat performs all the same validation and version calculation logic as the regularPrepareReleasemethod, but without making any git changesExample outputs
Text format:
JSON format:
{ "CurrentBranch": { "Name": "main", "Commit": "abc123...", "Version": "3.9-alpha" }, "NewBranch": { "Name": "v3.8", "Commit": "abc123...", "Version": "3.8" } }This enhancement provides a safe way for users to understand the impact of prepare-release operations before executing them, addressing the need for predictable version management workflows.
Fixes #1019.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.