mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2026-06-30 22:34:14 +02:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user