Update scripts and fix build

This commit is contained in:
Netch
2021-07-16 06:00:50 +08:00
parent df76db1f07
commit 4f07cf20bf
24 changed files with 189 additions and 87 deletions

View File

@@ -1,7 +1,6 @@
$exec=(Split-Path $MyInvocation.MyCommand.Path -Parent)
$last=(Get-Location).Path
Set-Location $exec
Push-Location $exec
$Env:CGO_ENABLED="0"
$Env:GOROOT_FINAL="/usr"
@@ -10,5 +9,5 @@ $Env:GOOS="windows"
$Env:GOARCH="amd64"
go build -a -trimpath -asmflags "-s -w" -ldflags "-s -w" -o "..\release\tun2socks.exe"
Set-Location $last
Pop-Location
exit $lastExitCode

View File

@@ -1,11 +1,10 @@
$exec=(Split-Path $MyInvocation.MyCommand.Path -Parent)
$last=(Get-Location).Path
Set-Location $exec
Push-Location $exec
rm -Force go.*
go mod init tun2socks
go mod tidy
Set-Location $last
Pop-Location
exit $lastExitCode