File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -327,7 +327,8 @@ function Start-PSBuild {
327327 [switch ]$Detailed ,
328328 [switch ]$InteractiveAuth ,
329329 [switch ]$SkipRoslynAnalyzers ,
330- [string ]$PSOptionsPath
330+ [string ]$PSOptionsPath ,
331+ [switch ]$IncludeXmlDocumentation
331332 )
332333
333334 if ($ReleaseTag -and $ReleaseTag -notmatch " ^v\d+\.\d+\.\d+(-(preview|rc)(\.\d{1,2})?)?$" ) {
@@ -622,6 +623,13 @@ Fix steps:
622623 }
623624 }
624625
626+ # Remove XML Documentation unless specifically requested to keep it
627+ if (-not $IncludeXmlDocumentation ) {
628+ Get-ChildItem $publishPath \* .xml | Where-Object {
629+ $_.Name -match ' (System\.Management|Microsoft\.PowerShell|pwsh).*\.xml'
630+ } | Remove-Item - Force
631+ }
632+
625633 # download modules from powershell gallery.
626634 # - PowerShellGet, PackageManagement, Microsoft.PowerShell.Archive
627635 if ($PSModuleRestore ) {
You can’t perform that action at this time.
0 commit comments