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
|
||||
|
||||
* [#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
|
||||
* [#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
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ function Compare-IcingaVersions()
|
|||
$CurrentVersion = Get-IcingaAgentVersion;
|
||||
}
|
||||
|
||||
if ($requiredVersion.Mayor -gt $currentVersion.Mayor) {
|
||||
if ($requiredVersion.Major -gt $currentVersion.Major) {
|
||||
return $FALSE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,10 +4,13 @@ function Split-IcingaVersion()
|
|||
[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)) {
|
||||
return @{
|
||||
'Full' = '';
|
||||
'Mayor' = $null;
|
||||
'Major' = $null;
|
||||
'Minor' = $null;
|
||||
'Fixes' = $null;
|
||||
'Snapshot' = $null;
|
||||
|
|
@ -24,6 +27,7 @@ function Split-IcingaVersion()
|
|||
return @{
|
||||
'Full' = $Version;
|
||||
'Mayor' = [int]$IcingaVersion[0];
|
||||
'Major' = [int]$IcingaVersion[0];
|
||||
'Minor' = [int]$IcingaVersion[1];
|
||||
'Fixes' = [int]$IcingaVersion[2];
|
||||
'Snapshot' = $Snapshot;
|
||||
|
|
|
|||
Loading…
Reference in a new issue