From 327c062dfeb23cf61131c989badee15a7282edf3 Mon Sep 17 00:00:00 2001 From: Beisi Zhou Date: Wed, 26 May 2021 11:18:29 +0800 Subject: [PATCH 1/2] AzPreview use latest Az.Accounts version --- tools/AzPreview/AzPreview.psd1 | 2 +- tools/RunVersionController.ps1 | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/AzPreview/AzPreview.psd1 b/tools/AzPreview/AzPreview.psd1 index 8859249fe1bc..aa8078e313e8 100644 --- a/tools/AzPreview/AzPreview.psd1 +++ b/tools/AzPreview/AzPreview.psd1 @@ -52,7 +52,7 @@ DotNetFrameworkVersion = '4.7.2' # ProcessorArchitecture = '' # Modules that must be imported into the global environment prior to importing this module -RequiredModules = @(@{ModuleName = 'Az.Accounts'; RequiredVersion = '2.3.0'; }, +RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '2.3.0'; }, @{ModuleName = 'Az.ADDomainServices'; RequiredVersion = '0.1.0'; }, @{ModuleName = 'Az.Advisor'; RequiredVersion = '1.1.1'; }, @{ModuleName = 'Az.Aks'; RequiredVersion = '2.1.0'; }, diff --git a/tools/RunVersionController.ps1 b/tools/RunVersionController.ps1 index 5a3f88cb403f..88376b545890 100644 --- a/tools/RunVersionController.ps1 +++ b/tools/RunVersionController.ps1 @@ -288,8 +288,13 @@ function Generate-AzPreview $Psd1Object = Import-PowerShellDataFile $Psd1FilePath $moduleName = "Az.${ModuleName}" $moduleVersion = $Psd1Object.ModuleVersion.ToString() - $requiredModulesString += "@{ModuleName = '$moduleName'; RequiredVersion = '$moduleVersion'; }, - " + if('Az.Accounts' -eq $moduleName) + { + $requiredModulesString += "@{ModuleName = '$moduleName'; ModuleVersion = '$moduleVersion'; }, `n " + } + else{ + $requiredModulesString += "@{ModuleName = '$moduleName'; RequiredVersion = '$moduleVersion'; }, `n " + } } } $requiredModulesString = $requiredModulesString.Trim() From eb88bfa0f1e70b8ff27afea696117ef83385443b Mon Sep 17 00:00:00 2001 From: Dingmeng Xue Date: Wed, 26 May 2021 13:18:53 +0800 Subject: [PATCH 2/2] Update RunVersionController.ps1 --- tools/RunVersionController.ps1 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/RunVersionController.ps1 b/tools/RunVersionController.ps1 index 88376b545890..c470a4b867ac 100644 --- a/tools/RunVersionController.ps1 +++ b/tools/RunVersionController.ps1 @@ -292,7 +292,8 @@ function Generate-AzPreview { $requiredModulesString += "@{ModuleName = '$moduleName'; ModuleVersion = '$moduleVersion'; }, `n " } - else{ + else + { $requiredModulesString += "@{ModuleName = '$moduleName'; RequiredVersion = '$moduleVersion'; }, `n " } } @@ -372,4 +373,4 @@ switch ($PSCmdlet.ParameterSetName) Generate-AzPreview } -} \ No newline at end of file +}