From e19f5232277efb37435cb65a83563d73333d62ec Mon Sep 17 00:00:00 2001 From: Laurent Trinques Date: Tue, 30 Jun 2026 18:49:43 +0200 Subject: [PATCH] fix(windows-msi): inject rev into MSI Version Build field Version was static (X.Y.Z.0) across nightlies, so MajorUpgrade never triggered the automatic uninstall; the Windows Installer only compares Major.Minor.Build, ignoring the 4th field. --- .github/workflows/windows-msi.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/windows-msi.yml b/.github/workflows/windows-msi.yml index 18ab46fdb..af838ff97 100644 --- a/.github/workflows/windows-msi.yml +++ b/.github/workflows/windows-msi.yml @@ -74,9 +74,6 @@ jobs: } } - # Numeric MSI version: 4 digits required (e.g. 0.100.1.0) - $verMsi = "$ver.0" - # Short SHA for the display version $sha = git rev-parse --short HEAD 2>$null if (-not $sha) { $sha = "unknown" } @@ -85,6 +82,13 @@ jobs: $count = git rev-list HEAD --count 2>$null $rev = [int]$count + 473 + # MSI Version only compares Major.Minor.Build (the 4th field is + # ignored by Windows Installer for upgrade detection), so we + # inject rev into Build to force a real increase between + # nightlies and trigger MajorUpgrade's automatic uninstall. + $verParts = $ver -split '\.' + $verMsi = "$($verParts[0]).$($verParts[1]).$($rev % 65535)" + $verDisplay = "${ver}-r${rev}-${sha}_x86_64-win64" echo "VERSION_MSI=$verMsi" >> $env:GITHUB_OUTPUT