Merged PR 6442: Moved the cleanup logic to Restore-PSModuleToBuild

Moved the cleanup logic to Restore-PSModuleToBuild

# Conflicts:
#	build.psm1
This commit is contained in:
Aditya Patwardhan 2019-01-10 00:12:40 +00:00 committed by Travis Plunk
parent cab8f26386
commit ea0b4de90a
No known key found for this signature in database
GPG Key ID: B60A25843F0C2CD1

View File

@ -478,9 +478,6 @@ Fix steps:
if ($CI) {
Restore-PSPester -Destination (Join-Path $publishPath "Modules")
}
# Remove .nupkg.metadata files
Get-ChildItem $publishPath -Filter '.nupkg.metadata' -Recurse | ForEach-Object { Remove-Item $_.FullName -ErrorAction SilentlyContinue -Force }
}
function Restore-PSPackage
@ -556,6 +553,9 @@ function Restore-PSModuleToBuild
Write-Log "Restore PowerShell modules to $publishPath"
$modulesDir = Join-Path -Path $publishPath -ChildPath "Modules"
Copy-PSGalleryModules -Destination $modulesDir -CsProjPath "$PSScriptRoot\src\Modules\PSGalleryModules.csproj"
# Remove .nupkg.metadata files
Get-ChildItem $PublishPath -Filter '.nupkg.metadata' -Recurse | ForEach-Object { Remove-Item $_.FullName -ErrorAction SilentlyContinue -Force }
}
function Restore-PSPester