mirror of
https://github.com/netchx/netch.git
synced 2026-05-11 23:45:06 +08:00
[Scripts] Update build.ps1
This commit is contained in:
21
build.ps1
21
build.ps1
@@ -11,11 +11,11 @@ param (
|
|||||||
|
|
||||||
[Parameter()]
|
[Parameter()]
|
||||||
[bool]
|
[bool]
|
||||||
$SelfContained = $False,
|
$SelfContained = $True,
|
||||||
|
|
||||||
[Parameter()]
|
[Parameter()]
|
||||||
[bool]
|
[bool]
|
||||||
$PublishReadyToRun = $False,
|
$PublishReadyToRun = $True,
|
||||||
|
|
||||||
[Parameter()]
|
[Parameter()]
|
||||||
[bool]
|
[bool]
|
||||||
@@ -26,21 +26,16 @@ Remove-Item -Recurse -Force $OutputPath -Confirm:$false -ErrorAction Ignore
|
|||||||
|
|
||||||
.\scripts\download.ps1 $OutputPath
|
.\scripts\download.ps1 $OutputPath
|
||||||
|
|
||||||
# if ( -Not $? ) {
|
|
||||||
# Exit 1
|
|
||||||
# }
|
|
||||||
|
|
||||||
Write-Host "Building $Configuration to $OutputPath"
|
Write-Host "Building $Configuration to $OutputPath"
|
||||||
dotnet publish `
|
dotnet publish `
|
||||||
-c $Configuration `
|
-c $Configuration `
|
||||||
-r "win-x64" `
|
-r 'win-x64' `
|
||||||
-p:Platform="x64" `
|
-p:Platform='x64' `
|
||||||
-p:PublishSingleFile=$PublishSingleFile `
|
|
||||||
-p:SelfContained=$SelfContained `
|
-p:SelfContained=$SelfContained `
|
||||||
-p:PublishTrimmed=$SelfContained `
|
-p:PublishTrimmed=$SelfContained `
|
||||||
-p:PublishReadyToRun=$PublishReadyToRun `
|
-p:PublishReadyToRun=$PublishReadyToRun `
|
||||||
|
-p:PublishSingleFile=$PublishSingleFile `
|
||||||
|
-p:IncludeNativeLibrariesForSelfExtract=$SelfContained `
|
||||||
-o $OutputPath `
|
-o $OutputPath `
|
||||||
Netch\Netch.csproj
|
'.\Netch\Netch.csproj'
|
||||||
|
exit $lastExitCode
|
||||||
if ($lastExitCode) { exit $lastExitCode }
|
|
||||||
exit 0
|
|
||||||
@@ -31,7 +31,6 @@ Remove-Item -Force data.zip
|
|||||||
Remove-Item -Force mode.zip
|
Remove-Item -Force mode.zip
|
||||||
Remove-Item -Force i18n.zip
|
Remove-Item -Force i18n.zip
|
||||||
|
|
||||||
#..\scripts\download\aiodns.ps1 -OutputPath bin
|
|
||||||
..\scripts\download\cloak.ps1 -OutputPath bin
|
..\scripts\download\cloak.ps1 -OutputPath bin
|
||||||
..\scripts\download\xray-core.ps1 -OutputPath bin
|
..\scripts\download\xray-core.ps1 -OutputPath bin
|
||||||
..\scripts\download\pcap2socks.ps1 -OutputPath bin
|
..\scripts\download\pcap2socks.ps1 -OutputPath bin
|
||||||
|
|||||||
@@ -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
|
|
||||||
Reference in New Issue
Block a user