diff --git a/tools/GenerateModules.ps1 b/tools/GenerateModules.ps1 index e2e090c2c5c..2eff7c1ac36 100644 --- a/tools/GenerateModules.ps1 +++ b/tools/GenerateModules.ps1 @@ -80,6 +80,7 @@ $ModuleToGenerate | ForEach-Object -Parallel { ExcludeExampleTemplates = $using:ExcludeExampleTemplates ExcludeNotesSection = $using:ExcludeNotesSection ArtifactsLocation = $using:ArtifactsLocation + RequiredModules = $using:RequiredGraphModules } & $using:GenerateServiceModulePS1 @ServiceModuleParams } diff --git a/tools/GenerateServiceModule.ps1 b/tools/GenerateServiceModule.ps1 index 2b60d371d88..8511d8eaaf3 100644 --- a/tools/GenerateServiceModule.ps1 +++ b/tools/GenerateServiceModule.ps1 @@ -8,6 +8,7 @@ Param( [ValidateSet("v1.0", "beta")] $ApiVersion = @("v1.0", "beta"), [Parameter(Mandatory = $true)] [ValidateNotNullOrEmpty()] [string] $ArtifactsLocation, + $RequiredModules = @(), [switch] $SkipGeneration = $false, [switch] $Build, [switch] $Test, @@ -81,7 +82,7 @@ $ApiVersion | ForEach-Object { if ($Build) { # Build generated module. - & $BuildModulePS1 -ModuleFullName $ModuleFullName -ModuleSrc $ModuleProjectPath -RequiredModules $RequiredGraphModules -EnableSigning:$EnableSigning -ExcludeExampleTemplates:$ExcludeExampleTemplates -ExcludeNotesSection:$ExcludeNotesSection -Version $ModuleMetadata.versions[$CurrentApiVersion].version -Prerelease $ModuleMetadata.versions[$CurrentApiVersion].prerelease -ModuleMetadata $ModuleMetadata.Clone() + & $BuildModulePS1 -ModuleFullName $ModuleFullName -ModuleSrc $ModuleProjectPath -RequiredModules $RequiredModules -EnableSigning:$EnableSigning -ExcludeExampleTemplates:$ExcludeExampleTemplates -ExcludeNotesSection:$ExcludeNotesSection -Version $ModuleMetadata.versions[$CurrentApiVersion].version -Prerelease $ModuleMetadata.versions[$CurrentApiVersion].prerelease -ModuleMetadata $ModuleMetadata.Clone() & $CleanUpPsm1 -ModuleProjectPath $ModuleProjectPath -FullyQualifiedModuleName $ModuleFullName if ($LastExitCode -ne 0) { Write-Host -ForegroundColor Red "Failed to build '$ModuleFullName' module."