-
-
Notifications
You must be signed in to change notification settings - Fork 393
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
Windows update script fails to account for milestone builds in current version check #1397
Comments
I modified the concatenation of if ($parts[2].EndsWith("-SNAPSHOT", "CurrentCultureIgnoreCase")) {
$CurrentVersion = $parts[0] + "." + $parts[1] + "." + $parts[2].Substring(0, $parts[2].Length - "-SNAPSHOT".Length);
}
else {
$CurrentVersion = $parts[0] + "." + $parts[1] + "." + $parts[2]
if($parts.length -eq 4) {
$CurrentVersion = $CurrentVersion + "." + $parts[3]
}
}
Write-Host -ForegroundColor Yellow "The current version is $CurrentVersion" The addition of the milestone to the $parts = $VersionNumber.Split(".")
if ($parts.Length -eq 2) {
$parts += "0"
}
if ($parts.Length -ne 3) {
throw "$VersionNumber is not formatted correctly (d.d.d)"
} Modifying this (probably impacts other parts of the script yet to be seen) to be I went back and looked and it appears the reinstallation warning ( |
When the current version of OpenHAB is a milestone build, the milestone is not added back to to the concatenation of the reconstructed
$CurrentVersion
. This causes the script to prompt for reinstallation vs updating if you're updating from thex.y.z.M1
build to thex.y.z
build.This example is taken from 3.2.0.M1 with the following
version.properties
openhab-distro/distributions/openhab/src/main/resources/bin/update.ps1
Line 404 in 557b820
The text was updated successfully, but these errors were encountered: