Skip to content

Commit 712afb9

Browse files
authored
Merge branch 'main' into Daily/Release_20250528064449
2 parents affc01a + 66ba285 commit 712afb9

File tree

4 files changed

+41
-26
lines changed

4 files changed

+41
-26
lines changed

src/Compute/Compute/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
2121
-->
2222
## Upcoming Release
23+
* Added breaking change message for `New-AzVM` and `New-AzVmss` cmdlets.
2324

2425
## Version 10.0.1
2526
* Added breaking change message for `New-AzVM` and `New-AzVmss` cmdlets.

src/SelfHelp/SelfHelp/Az.SelfHelp.psd1

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,16 +51,17 @@ DotNetFrameworkVersion = '4.7.2'
5151
# ProcessorArchitecture = ''
5252

5353
# Modules that must be imported into the global environment prior to importing this module
54+
5455
RequiredModules = @(@{ModuleName = 'Az.Accounts'; ModuleVersion = '5.0.2'; })
5556

5657
# Assemblies that must be loaded prior to importing this module
5758
RequiredAssemblies = 'SelfHelp.Autorest/bin/Az.SelfHelp.private.dll'
5859

5960
# Script files (.ps1) that are run in the caller's environment prior to importing this module.
60-
# ScriptsToProcess = @()
61+
ScriptsToProcess = @()
6162

6263
# Type files (.ps1xml) to be loaded when importing this module
63-
# TypesToProcess = @()
64+
TypesToProcess = @()
6465

6566
# Format files (.ps1xml) to be loaded when importing this module
6667
FormatsToProcess = 'SelfHelp.Autorest/Az.SelfHelp.format.ps1xml'
@@ -105,7 +106,7 @@ PrivateData = @{
105106
PSData = @{
106107

107108
# Tags applied to this module. These help with module discovery in online galleries.
108-
Tags = 'Azure','ResourceManager','ARM','PSModule','SelfHelp'
109+
Tags = 'Azure', 'ResourceManager', 'ARM', 'PSModule', 'SelfHelp'
109110

110111
# A URL to the license for this module.
111112
LicenseUri = 'https://aka.ms/azps-license'
@@ -130,7 +131,7 @@ PrivateData = @{
130131

131132
} # End of PSData hashtable
132133

133-
} # End of PrivateData hashtable
134+
} # End of PrivateData hashtable
134135

135136
# HelpInfo URI of this module
136137
# HelpInfoURI = ''

src/SelfHelp/SelfHelp/ChangeLog.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
- Additional information about change #1
1919
-->
2020
## Upcoming Release
21+
* Introduced various new features by upgrading code generator. Please see details [here](https://github.com/Azure/azure-powershell/blob/main/documentation/Autorest-powershell-v4-new-features.md).
2122

2223
## Version 0.3.0
2324
* Introduced various new features by upgrading code generator. Please see details [here](https://github.com/Azure/azure-powershell/blob/main/documentation/Autorest-powershell-v4-new-features.md).

tools/BuildScripts/AdaptAutorestModule.ps1

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -74,41 +74,53 @@ if (-not (Test-Path $slnPath)) {
7474
if (-not (Test-Path $parentModulePath)) {
7575
Write-Host "New module detected, creating parent module $parentModulePath ..." -ForegroundColor DarkGreen
7676
New-Item -ItemType Directory -Force -Path $parentModulePath
77-
<#
78-
create csproj for parent module if not existed
79-
#>
80-
$parentModuleCsprojPath = Join-Path $parentModulePath "$parentModuleName.csproj"
77+
}
78+
79+
<#
80+
create csproj for parent module if not existed
81+
#>
82+
$parentModuleCsprojPath = Join-Path $parentModulePath "$parentModuleName.csproj"
83+
if (-not (Test-Path $parentModuleCsprojPath)) {
8184
Write-Host "Creating $parentModuleCsprojPath ..." -ForegroundColor DarkGreen
8285
New-GeneratedFileFromTemplate -TemplateName 'HandcraftedModule.csproj' -GeneratedFileName "$parentModuleName.csproj" -GeneratedDirectory $parentModulePath -ModuleRootName $ModuleRootName -SubModuleName $parentModuleName
8386
dotnet sln $slnPath add $parentModuleCsprojPath
84-
<#
85-
create AsemblyInfo.cs for parent module if not existed
86-
#>
87-
$propertiesPath = Join-Path $parentModulePath 'Properties'
87+
}
88+
89+
<#
90+
create AsemblyInfo.cs for parent module if not existed
91+
#>
92+
$propertiesPath = Join-Path $parentModulePath 'Properties'
93+
if (-not (Test-Path $propertiesPath)) {
8894
New-Item -ItemType Directory -Force -Path $propertiesPath
89-
Write-Host "Creating $propertiesPath/AssemblyInfo.cs ..." -ForegroundColor DarkGreen
90-
New-GeneratedFileFromTemplate -TemplateName 'AssemblyInfo.cs' -GeneratedFileName "AssemblyInfo.cs" -GeneratedDirectory $propertiesPath -ModuleRootName $ModuleRootName -SubModuleName $parentModuleName
91-
<#
92-
create psd1 for parent module if not existed
93-
#>
95+
if (-not (Test-Path (Join-Path $propertiesPath 'AssemblyInfo.cs'))) {
96+
Write-Host "Creating $propertiesPath/AssemblyInfo.cs ..." -ForegroundColor DarkGreen
97+
New-GeneratedFileFromTemplate -TemplateName 'AssemblyInfo.cs' -GeneratedFileName "AssemblyInfo.cs" -GeneratedDirectory $propertiesPath -ModuleRootName $ModuleRootName -SubModuleName $parentModuleName
98+
}
99+
}
100+
101+
<#
102+
create psd1 for parent module if not existed
103+
#>
104+
if (-not (Test-Path (Join-Path $parentModulePath "Az.$ModuleRootName.psd1"))) {
94105
Write-Host "Creating $parentModulePath/Az.$ModuleRootName.psd1 ..." -ForegroundColor DarkGreen
95106
New-GeneratedFileFromTemplate -TemplateName 'Module.psd1' -GeneratedFileName "Az.$ModuleRootName.psd1" -GeneratedDirectory $parentModulePath -ModuleRootName $ModuleRootName -SubModuleName $parentModuleName
96-
<#
97-
create ChangeLog.md for parent module if not existed
98-
#>
107+
}
108+
109+
<#
110+
create ChangeLog.md for parent module if not existed
111+
#>
112+
if (-not (Test-Path (Join-Path $parentModulePath "ChangeLog.md"))) {
99113
Write-Host "Creating $parentModulePath/ChangeLog.md ..." -ForegroundColor DarkGreen
100114
New-GeneratedFileFromTemplate -TemplateName 'ChangeLog.md' -GeneratedFileName "ChangeLog.md" -GeneratedDirectory $parentModulePath -ModuleRootName $ModuleRootName -SubModuleName $parentModuleName
101115
}
116+
102117
<#
103118
merge sub module to parent module psd1
104119
#>
105-
$parentModulePsd1Path = Join-Path $ParentModulePath "Az.$ModuleRootName.psd1"
120+
$parentModulePsd1Path = Join-Path $parentModulePath "Az.$ModuleRootName.psd1"
106121
Write-Host "Merging metadata of $SubModulePath/Az.$subModuleNameTrimmed.psd1 to $parentModulePsd1Path ..." -ForegroundColor DarkGreen
107-
if (Test-Path $parentModulePsd1Path) {
108-
$parentModuleMetadata = Import-LocalizedData -BaseDirectory $ParentModulePath -FileName "Az.$ModuleRootName.psd1"
109-
} else {
110-
$parentModuleMetadata = Import-LocalizedData -BaseDirectory $TemplatePath -FileName 'Module.psd1'
111-
}
122+
$parentModuleMetadata = Import-LocalizedData -BaseDirectory $ParentModulePath -FileName "Az.$ModuleRootName.psd1"
123+
112124
$parentModuleMetadata.RequiredAssemblies = (@($parentModuleMetadata.RequiredAssemblies) + "$SubModuleName/bin/Az.$subModuleNameTrimmed.private.dll") | Select-Object -Unique
113125
$parentModuleMetadata.FormatsToProcess = (@($parentModuleMetadata.FormatsToProcess) + "$SubModuleName/Az.$subModuleNameTrimmed.format.ps1xml") | Select-Object -Unique
114126
$parentModuleMetadata.NestedModules = (@($parentModuleMetadata.NestedModules) + "$SubModuleName/Az.$subModuleNameTrimmed.psm1") | Select-Object -Unique

0 commit comments

Comments
 (0)