diff --git a/src/Communication/Communication.Autorest/build-module.ps1 b/src/Communication/Communication.Autorest/build-module.ps1 index f2eb1a353892..e51be0b2dbfc 100644 --- a/src/Communication/Communication.Autorest/build-module.ps1 +++ b/src/Communication/Communication.Autorest/build-module.ps1 @@ -12,7 +12,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code # is regenerated. # ---------------------------------------------------------------------------------- -param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs) +param([switch]$Isolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [Switch]$DisableAfterBuildTasks) $ErrorActionPreference = 'Stop' if($PSEdition -ne 'Core') { @@ -169,4 +169,14 @@ if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')) . (Join-Path $PSScriptRoot 'generate-portal-ux.ps1') } +if (-not $DisableAfterBuildTasks){ + $afterBuildTasksPath = Join-Path $PSScriptRoot '' + $afterBuildTasksArgs = ConvertFrom-Json 'true' -AsHashtable + if(Test-Path -Path $afterBuildTasksPath -PathType leaf){ + Write-Host -ForegroundColor Green 'Running after build tasks...' + . $afterBuildTasksPath @afterBuildTasksArgs + } +} + + Write-Host -ForegroundColor Green '-------------Done-------------' diff --git a/src/Communication/Communication/Az.Communication.psd1 b/src/Communication/Communication/Az.Communication.psd1 index 4c47f9975fe5..9156a559f83d 100644 --- a/src/Communication/Communication/Az.Communication.psd1 +++ b/src/Communication/Communication/Az.Communication.psd1 @@ -3,7 +3,7 @@ # # Generated by: Microsoft Corporation # -# Generated on: 5/8/2024 +# Generated on: 5/11/2024 # @{ @@ -64,8 +64,8 @@ ScriptsToProcess = @() TypesToProcess = @() # Format files (.ps1xml) to be loaded when importing this module -FormatsToProcess = 'Communication.Autorest\Az.Communication.format.ps1xml', - 'EmailService.Autorest\Az.EmailService.format.ps1xml' +FormatsToProcess = 'Communication.Autorest/Az.Communication.format.ps1xml', + 'EmailService.Autorest/Az.EmailService.format.ps1xml' # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess NestedModules = @('Communication.Autorest/Az.Communication.psm1', diff --git a/src/Communication/EmailService.Autorest/build-module.ps1 b/src/Communication/EmailService.Autorest/build-module.ps1 index 92cc5f2133af..faea08e5f6a5 100644 --- a/src/Communication/EmailService.Autorest/build-module.ps1 +++ b/src/Communication/EmailService.Autorest/build-module.ps1 @@ -12,7 +12,7 @@ # Code generated by Microsoft (R) AutoRest Code Generator.Changes may cause incorrect behavior and will be lost if the code # is regenerated. # ---------------------------------------------------------------------------------- -param([switch]$NotIsolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [switch]$UX) +param([switch]$NotIsolated, [switch]$Run, [switch]$Test, [switch]$Docs, [switch]$Pack, [switch]$Code, [switch]$Release, [switch]$Debugger, [switch]$NoDocs, [switch]$UX, [Switch]$DisableAfterBuildTasks) $ErrorActionPreference = 'Stop' if($PSEdition -ne 'Core') { @@ -177,4 +177,14 @@ if (Test-Path (Join-Path $PSScriptRoot 'generate-portal-ux.ps1')) . (Join-Path $PSScriptRoot 'generate-portal-ux.ps1') } +if (-not $DisableAfterBuildTasks){ + $afterBuildTasksPath = Join-Path $PSScriptRoot '' + $afterBuildTasksArgs = ConvertFrom-Json 'true' -AsHashtable + if(Test-Path -Path $afterBuildTasksPath -PathType leaf){ + Write-Host -ForegroundColor Green 'Running after build tasks...' + . $afterBuildTasksPath @afterBuildTasksArgs + } +} + + Write-Host -ForegroundColor Green '-------------Done-------------'