Update build.ps1

This commit is contained in:
Netch
2021-07-20 10:07:29 +08:00
parent a4fc19d2f6
commit 52b5867bd9

View File

@@ -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