-
Notifications
You must be signed in to change notification settings - Fork 0
Update versioning scheme to ensure monotonic build numbers #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -5,13 +5,15 @@ | |||||||||||
| <Nullable>enable</Nullable> | ||||||||||||
| <ImplicitUsings>enable</ImplicitUsings> | ||||||||||||
| <BlazorDisableThrowNavigationException>true</BlazorDisableThrowNavigationException> | ||||||||||||
| <!-- Version: 1.YY.BuildNumber.MMdd | ||||||||||||
| <!-- Version: 1.YY.BuildNumber+500.MMdd | ||||||||||||
| MSI only compares the first 3 fields for upgrade detection (4th is ignored). | ||||||||||||
| The build number (which changes every CI run) MUST be in the 3rd field, | ||||||||||||
| otherwise same-day builds produce duplicate entries in Apps & Features. | ||||||||||||
| CI uses github.run_number; local builds fall back to HHmm. --> | ||||||||||||
| <BuildRevision Condition="'$(BUILD_NUMBER)' != ''">$(BUILD_NUMBER)</BuildRevision> | ||||||||||||
| <BuildRevision Condition="'$(BUILD_NUMBER)' == ''">$([System.DateTime]::Now.ToString("HHmm"))</BuildRevision> | ||||||||||||
| CI uses github.run_number; local builds fall back to HHmm. | ||||||||||||
| BuildOffset ensures new versions (1.26.500+) are higher than old scheme (1.25.MMDD). --> | ||||||||||||
|
||||||||||||
| BuildOffset ensures new versions (1.26.500+) are higher than old scheme (1.25.MMDD). --> | |
| BuildOffset is only relevant when changing schemes within the same YY value: | |
| it must make the new 3rd field larger than any legacy 3rd-field value used | |
| by the old scheme for that same YY. A different YY (for example 1.26.* vs | |
| 1.25.*) is already ordered correctly by MSI without any offset. --> |
Copilot
AI
Apr 9, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MSI/ProductVersion segments must be <= 65535. With BuildRevision = BUILD_NUMBER + BuildOffset, the version will eventually exceed this limit once github.run_number grows past ~65035, which will break builds/installer upgrades. Consider capping or resetting the 3rd field (e.g., roll the major/minor/year when approaching the limit, or compute a bounded monotonic value per year) so the generated version always stays within MSI constraints.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The release tag uses UTC dates (
date -u) while the project version usesSystem.DateTime::Now(local time). Around midnight (or if runner time zones differ), this can produce a tag that doesn't match the built MSI/app version for the same run. Consider using UTC consistently on both sides (switch csproj toUtcNowor remove-uhere) to keep tags and artifacts aligned.