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..0837a516ddec 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() @@ -323,47 +328,47 @@ switch ($PSCmdlet.ParameterSetName) {$PSItem.StartsWith("ReleaseAz")} { # clean the unnecessary SerializedCmdlets json file - $ExistSerializedCmdletJsonFile = Get-ExistSerializedCmdletJsonFile - $ExpectJsonHashSet = @{} - $SrcPath = Join-Path -Path $PSScriptRoot -ChildPath "..\src" - foreach ($ModuleName in $(Get-ChildItem $SrcPath -Directory).Name) - { - $ModulePath = $(Join-Path -Path $SrcPath -ChildPath $ModuleName) - $Psd1FileName = "Az.{0}.psd1" -f $ModuleName - $Psd1FilePath = $(Get-ChildItem $ModulePath -Depth 2 -Recurse -Filter $Psd1FileName) - if ($null -ne $Psd1FilePath) - { - $Psd1Object = Import-PowerShellDataFile $Psd1FilePath - if ($Psd1Object.ModuleVersion -ge "1.0.0") - { - $ExpectJsonHashSet.Add("Az.${ModuleName}.json", $true) - } - } - } - foreach ($JsonFile in $ExistSerializedCmdletJsonFile) - { - $ModuleName = $JsonFile.Replace('.json', '') - if (!$ExpectJsonHashSet.Contains($JsonFile)) - { - Write-Warning "Module ${ModuleName} is not GA yet. The json file: ${JsonFile} is for reference" - } - } - try - { - if(!$SkipAzInstall.IsPresent) - { - Install-Module Az -Repository $GalleryName -Force -AllowClobber - } - } - catch - { - throw "Please rerun in Administrator mode." - } - - Write-Host executing dotnet $PSScriptRoot/../artifacts/VersionController/VersionController.Netcore.dll - dotnet $PSScriptRoot/../artifacts/VersionController/VersionController.Netcore.dll - - Bump-AzVersion + # $ExistSerializedCmdletJsonFile = Get-ExistSerializedCmdletJsonFile + # $ExpectJsonHashSet = @{} + # $SrcPath = Join-Path -Path $PSScriptRoot -ChildPath "..\src" + # foreach ($ModuleName in $(Get-ChildItem $SrcPath -Directory).Name) + # { + # $ModulePath = $(Join-Path -Path $SrcPath -ChildPath $ModuleName) + # $Psd1FileName = "Az.{0}.psd1" -f $ModuleName + # $Psd1FilePath = $(Get-ChildItem $ModulePath -Depth 2 -Recurse -Filter $Psd1FileName) + # if ($null -ne $Psd1FilePath) + # { + # $Psd1Object = Import-PowerShellDataFile $Psd1FilePath + # if ($Psd1Object.ModuleVersion -ge "1.0.0") + # { + # $ExpectJsonHashSet.Add("Az.${ModuleName}.json", $true) + # } + # } + # } + # foreach ($JsonFile in $ExistSerializedCmdletJsonFile) + # { + # $ModuleName = $JsonFile.Replace('.json', '') + # if (!$ExpectJsonHashSet.Contains($JsonFile)) + # { + # Write-Warning "Module ${ModuleName} is not GA yet. The json file: ${JsonFile} is for reference" + # } + # } + # try + # { + # if(!$SkipAzInstall.IsPresent) + # { + # Install-Module Az -Repository $GalleryName -Force -AllowClobber + # } + # } + # catch + # { + # throw "Please rerun in Administrator mode." + # } + + # Write-Host executing dotnet $PSScriptRoot/../artifacts/VersionController/VersionController.Netcore.dll + # dotnet $PSScriptRoot/../artifacts/VersionController/VersionController.Netcore.dll + + # Bump-AzVersion Generate-AzPreview }