From 884a7f454825f7973f3d90f3e8f2bf95e2839d2e Mon Sep 17 00:00:00 2001 From: JJ Fullmer Date: Thu, 22 Aug 2024 12:38:26 -0600 Subject: [PATCH] set cmdlets and variables to export to empty on build --- build.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.ps1 b/build.ps1 index 3ebc338..23ae212 100644 --- a/build.ps1 +++ b/build.ps1 @@ -413,6 +413,7 @@ $PublicFunctions = Get-ChildItem "$modulePath\Public" -Recurse -Filter '*.ps1' - $Classes = Get-ChildItem "$modulePath\Classes" -Recurse -Filter '*.ps1' -EA 0; $PrivateFunctions = Get-ChildItem "$modulePath\Private" -Recurse -Filter '*.ps1' -EA 0; $aliases = Get-AliasesToExport -psm1Path $moduleFile -modulePath $modulePath; + # mkdir "$PSSCriptRoot\ModuleBuild" -EA 0; # $buildPth = "$env:userprofile\ModuleBuild\$moduleName"; @@ -513,10 +514,12 @@ if($null -eq $aliases) { $manifestSplat.Remove('AliasesToExport') } - # Update-ModuleManifest -Path $manifest -ReleaseNotes $releaseNotes -ModuleVersion $newVer -RootModule "$moduleName.psm1" -FunctionsToExport $PublicFunctions.BaseName Update-ModuleManifest @manifestSplat; +Set-EmptyExportArray -psd1Path $Manifest -ExportType Cmdlets; +Set-EmptyExportArray -psd1Path $Manifest -ExportType Variables; + Copy-Item $manifest "$buildPth\$moduleName.psd1";