Fixes update path for v1.11.0

This commit is contained in:
Lord Hepipud 2023-11-03 17:05:24 +01:00
parent 3262530d13
commit e60a494ab3
2 changed files with 6 additions and 3 deletions

View file

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

View file

@ -2,7 +2,7 @@ function Update-Icinga()
{ {
param ( param (
[string]$Name = $null, [string]$Name = $null,
[string]$Version = $null, [string]$Version = 'release',
[switch]$Release = $FALSE, [switch]$Release = $FALSE,
[switch]$Snapshot = $FALSE, [switch]$Snapshot = $FALSE,
[switch]$Confirm = $FALSE, [switch]$Confirm = $FALSE,
@ -26,7 +26,10 @@ function Update-Icinga()
$NewVersion = $Component.LatestVersion; $NewVersion = $Component.LatestVersion;
if ([string]::IsNullOrEmpty($Version) -eq $FALSE) { 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)) { if ([string]::IsNullOrEmpty($NewVersion)) {