From de856dd2ec42f9f92bc3dc5a8a5f325b958d0445 Mon Sep 17 00:00:00 2001 From: Connection Refused Date: Mon, 18 Oct 2021 19:09:32 +0800 Subject: [PATCH] [Scripts] Update build.ps1 --- build.ps1 | 21 ++++++++------------- scripts/download.ps1 | 1 - scripts/download/aiodns.ps1 | 10 ---------- 3 files changed, 8 insertions(+), 24 deletions(-) delete mode 100644 scripts/download/aiodns.ps1 diff --git a/build.ps1 b/build.ps1 index f9215111..7eb9f1b1 100644 --- a/build.ps1 +++ b/build.ps1 @@ -11,11 +11,11 @@ param ( [Parameter()] [bool] - $SelfContained = $False, + $SelfContained = $True, [Parameter()] [bool] - $PublishReadyToRun = $False, + $PublishReadyToRun = $True, [Parameter()] [bool] @@ -26,21 +26,16 @@ Remove-Item -Recurse -Force $OutputPath -Confirm:$false -ErrorAction Ignore .\scripts\download.ps1 $OutputPath -# if ( -Not $? ) { -# Exit 1 -# } - Write-Host "Building $Configuration to $OutputPath" dotnet publish ` -c $Configuration ` - -r "win-x64" ` - -p:Platform="x64" ` - -p:PublishSingleFile=$PublishSingleFile ` + -r 'win-x64' ` + -p:Platform='x64' ` -p:SelfContained=$SelfContained ` -p:PublishTrimmed=$SelfContained ` -p:PublishReadyToRun=$PublishReadyToRun ` + -p:PublishSingleFile=$PublishSingleFile ` + -p:IncludeNativeLibrariesForSelfExtract=$SelfContained ` -o $OutputPath ` - Netch\Netch.csproj - -if ($lastExitCode) { exit $lastExitCode } -exit 0 + '.\Netch\Netch.csproj' +exit $lastExitCode \ No newline at end of file diff --git a/scripts/download.ps1 b/scripts/download.ps1 index a3a54644..302e9278 100644 --- a/scripts/download.ps1 +++ b/scripts/download.ps1 @@ -31,7 +31,6 @@ Remove-Item -Force data.zip Remove-Item -Force mode.zip Remove-Item -Force i18n.zip -#..\scripts\download\aiodns.ps1 -OutputPath bin ..\scripts\download\cloak.ps1 -OutputPath bin ..\scripts\download\xray-core.ps1 -OutputPath bin ..\scripts\download\pcap2socks.ps1 -OutputPath bin diff --git a/scripts/download/aiodns.ps1 b/scripts/download/aiodns.ps1 deleted file mode 100644 index 74b70d56..00000000 --- a/scripts/download/aiodns.ps1 +++ /dev/null @@ -1,10 +0,0 @@ -param([string]$OutputPath) -$address="https://github.com/aiocloud/aiodns/releases/download/1.0.4/aiodns.bin" -$domains="https://raw.githubusercontent.com/aiocloud/aiodns/master/aiodns.conf" - -Invoke-WebRequest -Uri $address -OutFile aiodns.bin -Invoke-WebRequest -Uri $domains -OutFile aiodns.conf - -Move-Item -Force aiodns.bin $OutputPath -Move-Item -Force aiodns.conf $OutputPath -exit 0