From 52b5867bd92c28d0a5255ef425b20ca227b1e653 Mon Sep 17 00:00:00 2001 From: Netch Date: Tue, 20 Jul 2021 10:07:29 +0800 Subject: [PATCH] Update build.ps1 --- build.ps1 | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/build.ps1 b/build.ps1 index a5e60a63..3cff4cd7 100644 --- a/build.ps1 +++ b/build.ps1 @@ -25,7 +25,7 @@ param ( Push-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) if (Test-Path -Path "$OutputPath") { - Remove-Item -Recurse -Force "$OutputPath" + rm -Recurse -Force "$OutputPath" } if (Test-Path -Path "$OutputPath" -IsValid) { @@ -38,10 +38,6 @@ if ( -Not $? ) { exit $lastExitCode } .\other\build.ps1 if ( -Not $? ) { exit $lastExitCode } -if (Test-Path '.\other\release') { - Copy-Item -Recurse -Force '.\other\release\*' "$OutputPath\bin" -} - Write-Host Write-Host 'Building Netch' dotnet publish ` @@ -64,11 +60,12 @@ msbuild ` '.\Redirector\Redirector.vcxproj' if ( -Not $? ) { exit $lastExitCode } -Copy-Item -Force 'Redirector\bin\Redirector.bin' "$OutputPath\bin" +cp -Force '.\other\release\*' "$OutputPath\bin" +cp -Force '.\Redirector\bin\Redirector.bin' "$OutputPath\bin" if ( $Configuration.Equals('Release') ) { - Remove-Item -Force "$OutputPath\*.pdb" - Remove-Item -Force "$OutputPath\*.xml" + rm -Force "$OutputPath\*.pdb" + rm -Force "$OutputPath\*.xml" } Pop-Location