Auto-increment package versions using run_number; fail on conflicts#4
Merged
Conversation
Co-authored-by: scott-wi <[email protected]>
Co-authored-by: scott-wi <[email protected]>
Copilot
AI
changed the title
[WIP] Fix library updates to correctly increment version numbers
Auto-increment package versions and fail on duplicates
Feb 6, 2026
Addresses PR review comment from scott-wi to make local development easier by providing a default version when -Version parameter is not specified. CI/CD workflows will continue to pass explicit versions. Co-authored-by: scott-wi <[email protected]>
Copilot
AI
changed the title
Auto-increment package versions and fail on duplicates
Auto-increment package versions using run_number; fail on conflicts
Feb 6, 2026
SummarySummary
CoverageClearHostedEndpoint.Tests - 96.6%
ClearHostedService.Tests - 100%
ClearMeasure.HostedEndpoint - 94.5%
ClearMeasure.HostedService - 81.8%
NServiceBus.Core - 20.4%
NServiceBus.Persistence.Sql - 5.6%
Serilog.Extensions.Logging - 3.7%
|
scott-wi
approved these changes
Feb 6, 2026
|
|
||
| [string]$PackageOutputPath, | ||
|
|
||
| [string]$Version, |
Collaborator
There was a problem hiding this comment.
Suggested change
| [string]$Version, | |
| [string]$Version = 0.0.999, |
To ensure local builds are easy, version should default to 0.0.999 if nothing passed in.
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.
NuGet packages used static version 1.0.0, causing "already been pushed" conflicts on every main branch deployment. The
--skip-duplicateflag silently masked these as warnings.Changes
Auto-versioning via GitHub Actions run_number
1.0.{run_number}-Versionparameter (defaults to0.0.999for local builds)dotnet packvia-p:Version=$VersionFail-fast on conflicts
--skip-duplicatefromdotnet nuget pushExample
Each push to main produces unique versions (1.0.11, 1.0.12, ...). Build fails immediately on version conflicts instead of silently skipping.
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.