fixed issue with tidying release files

This commit is contained in:
David Sparer
2017-03-18 00:24:07 -06:00
parent 96df821eca
commit 576f6a3bd6

View File

@@ -14,7 +14,7 @@ Write-Output "===== Beginning $($PSCmdlet.MyInvocation.MyCommand) ====="
if ($ConfigurationName -match "Release") {
Write-Output "Removing unnecessary files from Release versions"
Remove-Item -Path (Join-Path -Path $TargetDir -ChildPath "app.publish") -Recurse -Force
Remove-Item -Path $TargetDir -Recurse -Include @(
$filesToDelete = Get-ChildItem -Path $TargetDir -Recurse -Include @(
"*.pdb",
"*.publish",
"*.xml",
@@ -23,6 +23,8 @@ if ($ConfigurationName -match "Release") {
"*vshost*",
"*.tmp"
)
Remove-Item -Path $filesToDelete.FullName
Write-Output $filesToDelete.FullName
}
else {
Write-Output "We will not remove anything - this is not a release build."