Skip to content

Commit 910a65c

Browse files
committed
remove documentation files
1 parent dcf0bcc commit 910a65c

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

build.psm1

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff 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) {

0 commit comments

Comments
 (0)