fix: derive CLI version from the build instead of a stale constant#1157
Merged
Conversation
…onstant CliRunner.Version was a const '1.49.0' that had drifted two minor releases behind the actual build, so 'SysManager.exe --version' and --help reported the wrong version to scripts. It now reads UpdateService.CurrentVersion (the assembly version compiled from the csproj single source of truth), formatted to 3 parts, so it can never drift again. Test: CurrentVersion_MatchesBuildVersion_NeverDrifts pins the CLI version to the assembly version, failing the build on any future drift.
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.
What
The CLI reported a stale version (Batch 4 of 6, post-feature audit).
Fix
CliRunner.Versionwas a hardcodedconst = "1.49.0"while the build had moved to 1.51.x — soSysManager.exe --version,--version --json, and the--helpbanner all printed the wrong version to any script parsing them. It now derives fromUpdateService.CurrentVersion(the assembly version, set from the csproj single source of truth), formatted to 3 parts. The value can never drift from the build again.Test
CurrentVersion_MatchesBuildVersion_NeverDriftsasserts the CLI version equals the assembly version, so any future drift fails CI.Docs
CHANGELOG 1.51.4, version bump to 1.51.4.
Part of the post-feature audit remediation (Batch 4 of 6).