Nulah.PowerShell/src/PowershellModule/PostBuild.ps1
Scott 5c09b7c5a8 feat: Add GitRepoRegistration cmdlets (#5)
- adds GitRepoRegistration cmdlets
- adds basic tests for GitRepoRegistration implementations
- adds initial build project and scripts

Refs: #5, #6
2026-09-06 09:33:35 +10:00

28 lines
No EOL
832 B
PowerShell

<#
.SYNOPSIS
Removes all non-core files from build output
#>
param(
[Parameter(ValueFromPipeline = $true, Position = 0, Mandatory = $true)]
$targetDir
)
$nativeSqliteDllLocation = "$( $targetDir )runtimes\win-x64\native\e_sqlite3.dll";
if ($false -eq (Test-Path $nativeSqliteDllLocation))
{
Write-Error "POST BUILD FAILED: Unable to locate $nativeSqliteDllLocation"
}
Write-Host "Copying '$nativeSqliteDllLocation' to '$targetDir'"
Copy-Item -Path $nativeSqliteDllLocation -Destination $targetDir
# Because we use CopyLocalLockFileAssemblies Files that are needed for the module
$allowList = @(
"ModuleCore*"
"PowershellModule*"
"*SQLite*"
"data"
)
Write-Host "Removing all non-module required files from '$targetDir'"
Get-ChildItem -Path $targetDir -exclude $allowList | Remove-Item -Recurse