Skip to content

Commit 2534b42

Browse files
authored
Upgrade spec to 5.6.0 (#79)
1 parent 0d58b45 commit 2534b42

File tree

78 files changed

+3282
-1470
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

78 files changed

+3282
-1470
lines changed

docs/how-to-update-az-module-spec.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,15 @@ Have the following installed on your system:
4444

4545
```powershell
4646
# setup
47-
$azModuleVersion = '5.5.0'
47+
$azModuleVersion = '5.6.0'
4848
4949
# execute
5050
.\powershell-module\Scripts\New-AzCmdletSpec.ps1 -AzVersion $azModuleVersion -OutputDirectory (Join-Path -Path (Get-Location) -ChildPath 'powershell-module\Az.Tools.Migration\Resources\ModuleSpecs\Az\'$azModuleVersion)
5151
```
5252

5353
1. Update the Az PowerShell module version listed in documentation, function help, function
5454
parameter validation, and unit tests. The easiest way to do this is to perform a search to find
55-
and replace the old version. For example, search for '5.2.0' and replace with '5.5.0'.
55+
and replace the old version. For example, search for '5.2.0' and replace with '5.6.0'.
5656

5757
1. Remove the old module spec files from module resources:
5858
`powershell-module\Az.Tools.Migration\Resources\ModuleSpecs\Az\{old-version}`.

docs/quickstart-migrate-azurerm-to-az-automatically.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,12 @@ points that require changes when moving from AzureRM to the Az PowerShell cmdlet
4444
4545
```powershell
4646
# Generate an upgrade plan for the specified PowerShell script and save it to a variable.
47-
$Plan = New-AzUpgradeModulePlan -FromAzureRmVersion 6.13.1 -ToAzVersion 5.5.0 -FilePath 'C:\Scripts\my-azure-script.ps1'
47+
$Plan = New-AzUpgradeModulePlan -FromAzureRmVersion 6.13.1 -ToAzVersion 5.6.0 -FilePath 'C:\Scripts\my-azure-script.ps1'
4848
```
4949

5050
```powershell
5151
# Generate an upgrade plan for all the scripts and module files in the specified folder and save it to a variable.
52-
$Plan = New-AzUpgradeModulePlan -FromAzureRmVersion 6.13.1 -ToAzVersion 5.5.0 -DirectoryPath 'C:\Scripts'
52+
$Plan = New-AzUpgradeModulePlan -FromAzureRmVersion 6.13.1 -ToAzVersion 5.6.0 -DirectoryPath 'C:\Scripts'
5353
```
5454

5555
Review the results of the upgrade plan.
@@ -106,7 +106,7 @@ $Results | Where-Object UpgradeResult -ne UpgradeCompleted | Format-List
106106

107107
* File I/O operations use default encoding. Unusual file encoding situations may cause problems.
108108
* AzureRM cmdlets passed as arguments to Pester unit test mock statements aren't detected.
109-
* Currently, only Az PowerShell module version 5.5.0 is supported as a target.
109+
* Currently, only Az PowerShell module version 5.6.0 is supported as a target.
110110

111111
## Next steps
112112

powershell-module/Az.Tools.Migration/Az.Tools.Migration.psd1

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
RootModule = 'Az.Tools.Migration.psm1'
44

55
# Version number of this module.
6-
ModuleVersion = '1.0.0'
6+
ModuleVersion = '1.1.0'
77

88
# Supported PSEditions
99
CompatiblePSEditions = 'Core', 'Desktop'
@@ -108,8 +108,11 @@
108108
# IconUri = ''
109109

110110
# ReleaseNotes of this module
111-
ReleaseNotes = '* General availability of ''Az.Tools.Migration'' module
112-
* Upgraded Az version to 5.2'
111+
ReleaseNotes = '* Upgrade Az version to 5.6.0
112+
* Fixed a bug where New-AzUpgradeModulePlan throws errors when analyzing hashtable code (issue #73).
113+
* Updated scanning results for Az cmdlets that implement dynamic parameters to use clearer warnings.
114+
* Updated Get-AzUpgradeCmdletSpec to improve performance.
115+
* Updated quickstart guide to remove outdated guidance on splatted parameter detection.'
113116
}
114117
}
115118

powershell-module/Az.Tools.Migration/Functions/Public/Get-AzUpgradeAliasSpec.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ function Get-AzUpgradeAliasSpec
1111
Specify the version of the module to import command aliases from.
1212
1313
.EXAMPLE
14-
PS C:\> Get-AzUpgradeAliasSpec -ModuleVersion "5.5.0"
15-
Returns the cmdlet alias mappings table for Az 5.5.0.
14+
PS C:\> Get-AzUpgradeAliasSpec -ModuleVersion "5.6.0"
15+
Returns the cmdlet alias mappings table for Az 5.6.0.
1616
#>
1717
[CmdletBinding()]
1818
Param

powershell-module/Az.Tools.Migration/Functions/Public/Invoke-AzUpgradeModulePlan.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ function Invoke-AzUpgradeModulePlan
2323
The following example invokes the upgrade plan for a PowerShell module named "myModule" and saves the updated file contents into new files (leaving original files unmodified).
2424
2525
# step 1: generate a plan and save it to a variable.
26-
$plan = New-AzUpgradeModulePlan -FromAzureRmVersion 6.13.1 -ToAzVersion 5.5.0 -DirectoryPath 'C:\Scripts\myModule'
26+
$plan = New-AzUpgradeModulePlan -FromAzureRmVersion 6.13.1 -ToAzVersion 5.6.0 -DirectoryPath 'C:\Scripts\myModule'
2727
2828
# step 2: write the plan to the console to review the upgrade steps, warnings, and errors.
2929
$plan
@@ -38,7 +38,7 @@ function Invoke-AzUpgradeModulePlan
3838
The following example invokes the upgrade plan for a PowerShell module named "myModule" and modifies the existing files in place.
3939
4040
# step 1: generate a plan and save it to a variable.
41-
$plan = New-AzUpgradeModulePlan -FromAzureRmVersion 6.13.1 -ToAzVersion 5.5.0 -DirectoryPath 'C:\Scripts\myModule'
41+
$plan = New-AzUpgradeModulePlan -FromAzureRmVersion 6.13.1 -ToAzVersion 5.6.0 -DirectoryPath 'C:\Scripts\myModule'
4242
4343
# step 2: write the plan to the console to review the upgrade steps, warnings, and errors.
4444
$plan

powershell-module/Az.Tools.Migration/Functions/Public/New-AzUpgradeModulePlan.ps1

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function New-AzUpgradeModulePlan
1111
Specifies the AzureRM module version used in your existing PowerShell scripts(s) or modules.
1212
1313
.PARAMETER ToAzVersion
14-
Specifies the Az module version to upgrade to. Currently, only Az version 5.5.0 is supported.
14+
Specifies the Az module version to upgrade to. Currently, only Az version 5.6.0 is supported.
1515
1616
.PARAMETER FilePath
1717
Specifies the path to a single PowerShell file.
@@ -34,32 +34,32 @@ function New-AzUpgradeModulePlan
3434
.EXAMPLE
3535
The following example generates a new Az module upgrade plan for the script file 'C:\Scripts\my-azure-script.ps1'.
3636
37-
New-AzUpgradeModulePlan -FromAzureRmVersion 6.13.1 -ToAzVersion 5.5.0 -FilePath 'C:\Scripts\my-azure-script.ps1'
37+
New-AzUpgradeModulePlan -FromAzureRmVersion 6.13.1 -ToAzVersion 5.6.0 -FilePath 'C:\Scripts\my-azure-script.ps1'
3838
3939
.EXAMPLE
4040
The following example generates a new Az module upgrade plan for the script and module files located under C:\Scripts.
4141
42-
New-AzUpgradeModulePlan -FromAzureRmVersion 6.13.1 -ToAzVersion 5.5.0 -DirectoryPath 'C:\Scripts'
42+
New-AzUpgradeModulePlan -FromAzureRmVersion 6.13.1 -ToAzVersion 5.6.0 -DirectoryPath 'C:\Scripts'
4343
4444
.EXAMPLE
4545
The following example generates a new Az module upgrade plan for the script and module files under C:\Scripts.
4646
4747
$references = Find-AzUpgradeCommandReference -DirectoryPath 'C:\Scripts' -AzureRmVersion '6.13.1'
48-
New-AzUpgradeModulePlan -ToAzVersion 5.5.0 -AzureRmCmdReference $references
48+
New-AzUpgradeModulePlan -ToAzVersion 5.6.0 -AzureRmCmdReference $references
4949
5050
.EXAMPLE
5151
The following example generates a new Az module upgrade plan for the script and module files under several directories.
5252
Module specs are pre-loaded here to avoid re-loading the spec each time a plan is generated.
5353
5454
# pre-load specifications
5555
$armSpec = Get-AzUpgradeCmdletSpec -ModuleName "AzureRM" -ModuleVersion "6.13.1"
56-
$azSpec = Get-AzUpgradeCmdletSpec -ModuleName "Az" -ModuleVersion "5.5.0"
57-
$azAliases = Get-AzUpgradeAliasSpec -ModuleVersion "5.5.0"
56+
$azSpec = Get-AzUpgradeCmdletSpec -ModuleName "Az" -ModuleVersion "5.6.0"
57+
$azAliases = Get-AzUpgradeAliasSpec -ModuleVersion "5.6.0"
5858
5959
# execute a batch of module upgrades
60-
$plan1 = New-AzUpgradeModulePlan -DirectoryPath 'C:\Scripts1' -FromAzureRmVersion '6.13.1' -ToAzVersion '5.5.0' -AzureRmModuleSpec $armSpec -AzModuleSpec $azSpec -AzAliasMappingSpec $azAliases
61-
$plan2 = New-AzUpgradeModulePlan -DirectoryPath 'C:\Scripts2' -FromAzureRmVersion '6.13.1' -ToAzVersion '5.5.0' -AzureRmModuleSpec $armSpec -AzModuleSpec $azSpec -AzAliasMappingSpec $azAliases
62-
$plan3 = New-AzUpgradeModulePlan -DirectoryPath 'C:\Scripts3' -FromAzureRmVersion '6.13.1' -ToAzVersion '5.5.0' -AzureRmModuleSpec $armSpec -AzModuleSpec $azSpec -AzAliasMappingSpec $azAliases
60+
$plan1 = New-AzUpgradeModulePlan -DirectoryPath 'C:\Scripts1' -FromAzureRmVersion '6.13.1' -ToAzVersion '5.6.0' -AzureRmModuleSpec $armSpec -AzModuleSpec $azSpec -AzAliasMappingSpec $azAliases
61+
$plan2 = New-AzUpgradeModulePlan -DirectoryPath 'C:\Scripts2' -FromAzureRmVersion '6.13.1' -ToAzVersion '5.6.0' -AzureRmModuleSpec $armSpec -AzModuleSpec $azSpec -AzAliasMappingSpec $azAliases
62+
$plan3 = New-AzUpgradeModulePlan -DirectoryPath 'C:\Scripts3' -FromAzureRmVersion '6.13.1' -ToAzVersion '5.6.0' -AzureRmModuleSpec $armSpec -AzModuleSpec $azSpec -AzAliasMappingSpec $azAliases
6363
#>
6464
[CmdletBinding()]
6565
Param
@@ -103,7 +103,7 @@ function New-AzUpgradeModulePlan
103103
Mandatory=$true,
104104
HelpMessage='Specify the Az module version to upgrade to.')]
105105
[System.String]
106-
[ValidateSet('5.5.0')]
106+
[ValidateSet('5.6.0')]
107107
$ToAzVersion,
108108

109109
[Parameter(Mandatory=$false)]

0 commit comments

Comments
 (0)