github.com/ice-blockchain/go/src@v0.0.0-20240403114104-1564d284e521/run.bat (about) 1 :: Copyright 2012 The Go Authors. All rights reserved. 2 :: Use of this source code is governed by a BSD-style 3 :: license that can be found in the LICENSE file. 4 5 @echo off 6 7 if exist ..\bin\go.exe goto ok 8 echo Must run run.bat from Go src directory after installing cmd/go. 9 goto fail 10 :ok 11 12 :: Keep environment variables within this script 13 :: unless invoked with --no-local. 14 if x%1==x--no-local goto nolocal 15 if x%2==x--no-local goto nolocal 16 setlocal 17 :nolocal 18 19 set GOBUILDFAIL=0 20 21 set GOENV=off 22 ..\bin\go tool dist env > env.bat 23 if errorlevel 1 goto fail 24 call .\env.bat 25 del env.bat 26 27 set GOPATH=c:\nonexist-gopath 28 29 if x%1==x--no-rebuild goto norebuild 30 ..\bin\go tool dist test --rebuild 31 if errorlevel 1 goto fail 32 goto end 33 34 :norebuild 35 ..\bin\go tool dist test 36 if errorlevel 1 goto fail 37 goto end 38 39 :fail 40 set GOBUILDFAIL=1 41 42 :end