mirror of
https://github.com/Icinga/icinga-powershell-framework.git
synced 2025-12-20 23:00:35 -05:00
Fixes version splitting by returning major object
This commit is contained in:
parent
bca85efcb0
commit
63f24399b8
3 changed files with 6 additions and 1 deletions
|
|
@ -13,6 +13,7 @@ Released closed milestones can be found on [GitHub](https://github.com/Icinga/ic
|
||||||
|
|
||||||
### Bugfixes
|
### Bugfixes
|
||||||
|
|
||||||
|
* [#291](https://github.com/Icinga/icinga-powershell-framework/issues/291) Fixes `Split-IcingaVersion` by returning data with naming `mayor` for the version instead of `major`. We will return both results to give developers time to adjust their code before removing the `mayor` object
|
||||||
* [#379](https://github.com/Icinga/icinga-powershell-framework/issues/379) Fixes memory leak for Icinga for Windows by using a custom function being more aggressive on memory cleanup
|
* [#379](https://github.com/Icinga/icinga-powershell-framework/issues/379) Fixes memory leak for Icinga for Windows by using a custom function being more aggressive on memory cleanup
|
||||||
* [#402](https://github.com/Icinga/icinga-powershell-framework/pull/402) Fixes missing address attribute for REST-Api daemon, making it unable to change the listening address
|
* [#402](https://github.com/Icinga/icinga-powershell-framework/pull/402) Fixes missing address attribute for REST-Api daemon, making it unable to change the listening address
|
||||||
* [#403](https://github.com/Icinga/icinga-powershell-framework/pull/403) Fixes memory leak on newly EventLog reader for CLI event stream
|
* [#403](https://github.com/Icinga/icinga-powershell-framework/pull/403) Fixes memory leak on newly EventLog reader for CLI event stream
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ function Compare-IcingaVersions()
|
||||||
$CurrentVersion = Get-IcingaAgentVersion;
|
$CurrentVersion = Get-IcingaAgentVersion;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($requiredVersion.Mayor -gt $currentVersion.Mayor) {
|
if ($requiredVersion.Major -gt $currentVersion.Major) {
|
||||||
return $FALSE;
|
return $FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,10 +4,13 @@ function Split-IcingaVersion()
|
||||||
[string]$Version
|
[string]$Version
|
||||||
);
|
);
|
||||||
|
|
||||||
|
# TODO: Allow developers to adjust their code from mayor to major naming
|
||||||
|
# for the next releases and remove the mayor naming in the future
|
||||||
if ([string]::IsNullOrEmpty($Version)) {
|
if ([string]::IsNullOrEmpty($Version)) {
|
||||||
return @{
|
return @{
|
||||||
'Full' = '';
|
'Full' = '';
|
||||||
'Mayor' = $null;
|
'Mayor' = $null;
|
||||||
|
'Major' = $null;
|
||||||
'Minor' = $null;
|
'Minor' = $null;
|
||||||
'Fixes' = $null;
|
'Fixes' = $null;
|
||||||
'Snapshot' = $null;
|
'Snapshot' = $null;
|
||||||
|
|
@ -24,6 +27,7 @@ function Split-IcingaVersion()
|
||||||
return @{
|
return @{
|
||||||
'Full' = $Version;
|
'Full' = $Version;
|
||||||
'Mayor' = [int]$IcingaVersion[0];
|
'Mayor' = [int]$IcingaVersion[0];
|
||||||
|
'Major' = [int]$IcingaVersion[0];
|
||||||
'Minor' = [int]$IcingaVersion[1];
|
'Minor' = [int]$IcingaVersion[1];
|
||||||
'Fixes' = [int]$IcingaVersion[2];
|
'Fixes' = [int]$IcingaVersion[2];
|
||||||
'Snapshot' = $Snapshot;
|
'Snapshot' = $Snapshot;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue