Skip to content

Commit

Permalink
AzPreview use latest Az.Accounts version (#15111)
Browse files Browse the repository at this point in the history
* AzPreview use latest Az.Accounts version

* Update RunVersionController.ps1

Co-authored-by: Dingmeng Xue <[email protected]>
  • Loading branch information
BethanyZhou and dingmeng-xue authored May 27, 2021
1 parent de5677a commit 4115d19
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tools/AzPreview/AzPreview.psd1
Original file line number Diff line number Diff line change
Expand Up @@ -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'; },
Expand Down
12 changes: 9 additions & 3 deletions tools/RunVersionController.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,14 @@ 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()
Expand Down Expand Up @@ -367,4 +373,4 @@ switch ($PSCmdlet.ParameterSetName)

Generate-AzPreview
}
}
}

0 comments on commit 4115d19

Please sign in to comment.