Skip to content

Commit 8d7e355

Browse files
committedNov 3, 2023
Fixes update path for v1.11.0
1 parent 111c771 commit 8d7e355

File tree

2 files changed

+9
-6
lines changed

2 files changed

+9
-6
lines changed
 

‎lib/core/repository/Install-IcingaComponent.psm1

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ function Install-IcingaComponent()
2121

2222
Set-IcingaTLSVersion;
2323

24-
if ($Version -eq 'release') {
24+
if ($Version.ToLower() -eq 'release' -Or $Version.ToLower() -eq 'latest') {
2525
$Version = $null;
2626
}
2727

‎lib/core/repository/Update-Icinga.psm1

+8-5
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ function Update-Icinga()
22
{
33
param (
44
[string]$Name = $null,
5-
[string]$Version = $null,
5+
[string]$Version = 'release',
66
[switch]$Release = $FALSE,
77
[switch]$Snapshot = $FALSE,
88
[switch]$Confirm = $FALSE,
@@ -23,10 +23,13 @@ function Update-Icinga()
2323
continue;
2424
}
2525

26-
if ([string]::IsNullOrEmpty($Version) -eq $FALSE){
27-
$NewVersion = $Component.LatestVersion;
28-
} else {
29-
$NewVersion = $Version;
26+
$NewVersion = $Component.LatestVersion;
27+
28+
if ([string]::IsNullOrEmpty($Version) -eq $FALSE) {
29+
# Ensure we are backwards compatible with Icinga for Windows v1.11.0 which broke the version update feature
30+
if ($Version.ToLower() -ne 'release' -And $Version.ToLower() -ne 'latest') {
31+
$NewVersion = $Version;
32+
}
3033
}
3134

3235
if ([string]::IsNullOrEmpty($NewVersion)) {

0 commit comments

Comments
 (0)
Please sign in to comment.