Add --what-if option to prepare-release command for simulating version changes#1242
Merged
Conversation
Co-authored-by: AArnott <[email protected]>
Co-authored-by: AArnott <[email protected]>
AArnott
requested changes
Aug 10, 2025
Co-authored-by: AArnott <[email protected]>
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 <[email protected]>
AArnott
approved these changes
Dec 20, 2025
This was referenced Jun 19, 2026
This was referenced Jul 6, 2026
Open
Open
AngeloDotNet
added a commit
to AngeloDotNet/TinyDatabaseLocalization
that referenced
this pull request
Jul 9, 2026
Updated [Nerdbank.GitVersioning](https://github.com/dotnet/Nerdbank.GitVersioning) from 3.9.50 to 3.10.91. <details> <summary>Release notes</summary> _Sourced from [Nerdbank.GitVersioning's releases](https://github.com/dotnet/Nerdbank.GitVersioning/releases)._ ## 3.10.91 ## What's Changed * Retry file operations on access denied errors by @AArnott in dotnet/Nerdbank.GitVersioning#1408 **Full Changelog**: dotnet/Nerdbank.GitVersioning@v3.10.85...v3.10.91 ## 3.10.85 ## What's Changed * Avoid writing server.json multiple times in a single pack by @AArnott in dotnet/Nerdbank.GitVersioning#1391 **Full Changelog**: dotnet/Nerdbank.GitVersioning@v3.10.70...v3.10.85 ## 3.10.70 ## What's Changed ### Fixes * Fix case insensitivity for the managed engine on git worktrees, and implement for libgit2 by @AArnott in dotnet/Nerdbank.GitVersioning#1334 * Fix native heap corruption in GitPackIndexMappedReaderTests by @AArnott in dotnet/Nerdbank.GitVersioning#1360 ### Enhancements * Add prerelease property to inheriting version.json files by @Copilot in dotnet/Nerdbank.GitVersioning#1317 * Add NBGV_SetCloudBuildVersionVars property to disable cloud build variable output by @Copilot in dotnet/Nerdbank.GitVersioning#1324 * Add --what-if option to prepare-release command for simulating version changes by @Copilot in dotnet/Nerdbank.GitVersioning#1242 * Build nbgv CLI tool for .NET 9 and 10 by @AArnott in dotnet/Nerdbank.GitVersioning#1369 **Full Changelog**: dotnet/Nerdbank.GitVersioning@v3.9.50...v3.10.70 ## 3.10.44-alpha ## What's Changed ### Fixes * Fix case insensitivity for the managed engine on git worktrees, and implement for libgit2 by @AArnott in dotnet/Nerdbank.GitVersioning#1334 ### Enhancements * Add --what-if option to prepare-release command for simulating version changes by @Copilot in dotnet/Nerdbank.GitVersioning#1242 * Add NBGV_SetCloudBuildVersionVars property to disable cloud build variable output by @Copilot in dotnet/Nerdbank.GitVersioning#1324 ### Dependency updates * chore(deps): update dependency microsoft.build.locator to 1.11.2 by @renovate[bot] in dotnet/Nerdbank.GitVersioning#1304 * chore(deps): update dotnet monorepo by @renovate[bot] in dotnet/Nerdbank.GitVersioning#1309 * Update dotnet monorepo by @renovate[bot] in dotnet/Nerdbank.GitVersioning#1338 **Full Changelog**: dotnet/Nerdbank.GitVersioning@v3.10.8-alpha...v3.10.44-alpha ## 3.10.8-alpha ## What's Changed * Add prerelease property to inheriting version.json files by @Copilot in dotnet/Nerdbank.GitVersioning#1317 **Full Changelog**: dotnet/Nerdbank.GitVersioning@v3.9.50...v3.10.8-alpha Commits viewable in [compare view](dotnet/Nerdbank.GitVersioning@v3.9.50...v3.10.91). </details> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details>
This was referenced Jul 9, 2026
Bump Microsoft.NET.Test.Sdk, Nerdbank.GitVersioning and YamlDotNet
bricelam/Bricelam.PowerFx.Linq#36
Merged
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.