From 04d3cd2c5c4eda6e8e0f3245353408f4da8b389c Mon Sep 17 00:00:00 2001 From: Jagadish Murugan Date: Tue, 25 Jun 2024 19:34:01 -0700 Subject: [PATCH] fix EdgeConfig version compare logic (#186) * fix EdgeConfig version compare logic * use System.Version compare instead --- tools/modules/AksEdgeDeploy/AksEdgeDeploy.psm1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/modules/AksEdgeDeploy/AksEdgeDeploy.psm1 b/tools/modules/AksEdgeDeploy/AksEdgeDeploy.psm1 index 7641590..e15c133 100644 --- a/tools/modules/AksEdgeDeploy/AksEdgeDeploy.psm1 +++ b/tools/modules/AksEdgeDeploy/AksEdgeDeploy.psm1 @@ -279,8 +279,7 @@ function UpgradeJsonFormat { } #upgrade from public preview format to GA format $edgeCfg = $jsonObj.AksEdgeConfig - - if ($edgeCfg.SchemaVersion -gt "1.4") { + if ([version]$edgeCfg.SchemaVersion -gt [version]"1.4") { if (($azCfg.Auth.Password) -and ([string]::IsNullOrEmpty($($edgeCfg.Arc.ClientSecret)))) { #Copy over the Azure parameters to Arc section $edgeCfg | Add-Member -MemberType NoteProperty -Name 'Arc' -Value $arcdata -Force