Merge pull request #671 from Icinga:fix/ensure_update_compatibility_with_version_1.11.0

Fix: Update compatibility with Icinga for Windows v1.11.0

Ensures the backwards compatibility with Icinga for Windows v1.11.0, which broke the update mechanism for version checks.
This commit is contained in:
Lord Hepipud 2023-11-03 17:21:18 +01:00 committed by GitHub
commit d024542081
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 3 deletions

View file

@ -21,7 +21,7 @@ function Install-IcingaComponent()
Set-IcingaTLSVersion;
if ($Version -eq 'release') {
if ($Version.ToLower() -eq 'release' -Or $Version.ToLower() -eq 'latest') {
$Version = $null;
}

View file

@ -2,7 +2,7 @@ function Update-Icinga()
{
param (
[string]$Name = $null,
[string]$Version = $null,
[string]$Version = 'release',
[switch]$Release = $FALSE,
[switch]$Snapshot = $FALSE,
[switch]$Confirm = $FALSE,
@ -26,7 +26,10 @@ function Update-Icinga()
$NewVersion = $Component.LatestVersion;
if ([string]::IsNullOrEmpty($Version) -eq $FALSE) {
$NewVersion = $Version;
# Ensure we are backwards compatible with Icinga for Windows v1.11.0 which broke the version update feature
if ($Version.ToLower() -ne 'release' -And $Version.ToLower() -ne 'latest') {
$NewVersion = $Version;
}
}
if ([string]::IsNullOrEmpty($NewVersion)) {