diff --git a/src/all.bat b/src/all.bat index 0c4d5de70c..483151b893 100644 --- a/src/all.bat +++ b/src/all.bat @@ -11,10 +11,8 @@ echo all.bat must be run from go\src exit /b 1 :ok -call .\make.bat --no-banner --no-local -if errorlevel 1 goto fail -call .\run.bat --no-rebuild -if errorlevel 1 goto fail +call .\make.bat --no-banner --no-local || goto fail +call .\run.bat --no-rebuild || goto fail "%GOTOOLDIR%/dist" banner goto :eof diff --git a/src/clean.bat b/src/clean.bat index ceba3a56cf..51fa857b7c 100644 --- a/src/clean.bat +++ b/src/clean.bat @@ -6,8 +6,7 @@ setlocal -go tool dist env -w -p >env.bat -if errorlevel 1 goto fail +go tool dist env -w -p >env.bat || goto fail call .\env.bat del env.bat echo. diff --git a/src/make.bat b/src/make.bat index 3a72a59470..57e4e5f80c 100644 --- a/src/make.bat +++ b/src/make.bat @@ -101,11 +101,9 @@ echo Building Go cmd/dist using %GOROOT_BOOTSTRAP%. (%GOROOT_BOOTSTRAP_VERSION%) if x%vflag==x-v echo cmd/dist set GOROOT=%GOROOT_BOOTSTRAP% set GOBIN= -"%GOROOT_BOOTSTRAP%\bin\go.exe" build -o cmd\dist\dist.exe .\cmd\dist +"%GOROOT_BOOTSTRAP%\bin\go.exe" build -o cmd\dist\dist.exe .\cmd\dist || goto fail endlocal -if errorlevel 1 goto fail -.\cmd\dist\dist.exe env -w -p >env.bat -if errorlevel 1 goto fail +.\cmd\dist\dist.exe env -w -p >env.bat || goto fail call .\env.bat del env.bat if x%vflag==x-v echo. @@ -148,8 +146,7 @@ if x%4==x--distpack set bootstrapflags=%bootstrapflags% -distpack :: Run dist bootstrap to complete make.bash. :: Bootstrap installs a proper cmd/dist, built with the new toolchain. :: Throw ours, built with the bootstrap toolchain, away after bootstrap. -.\cmd\dist\dist.exe bootstrap -a %vflag% %bootstrapflags% -if errorlevel 1 goto fail +.\cmd\dist\dist.exe bootstrap -a %vflag% %bootstrapflags% || goto fail del .\cmd\dist\dist.exe goto :eof diff --git a/src/race.bat b/src/race.bat index 64510b6012..2f6ba91475 100644 --- a/src/race.bat +++ b/src/race.bat @@ -15,10 +15,8 @@ exit /b 1 :ok set GOROOT=%CD%\.. -call .\make.bat --dist-tool >NUL -if errorlevel 1 goto fail -.\cmd\dist\dist.exe env -w -p >env.bat -if errorlevel 1 goto fail +call .\make.bat --dist-tool >NUL || goto fail +.\cmd\dist\dist.exe env -w -p >env.bat || goto fail call .\env.bat del env.bat @@ -27,15 +25,11 @@ echo Race detector is only supported on windows/amd64. goto fail :continue -call .\make.bat --no-banner --no-local -if errorlevel 1 goto fail +call .\make.bat --no-banner --no-local || goto fail echo # go install -race std -go install -race std -if errorlevel 1 goto fail +go install -race std || goto fail +go tool dist test -race || goto fail -go tool dist test -race - -if errorlevel 1 goto fail echo All tests passed. goto :eof diff --git a/src/run.bat b/src/run.bat index 6a0ffe3af9..3e7b1a1b0c 100644 --- a/src/run.bat +++ b/src/run.bat @@ -12,14 +12,12 @@ goto fail setlocal set GOENV=off -..\bin\go tool dist env > env.bat -if errorlevel 1 goto fail +..\bin\go tool dist env > env.bat || goto fail call .\env.bat del env.bat set GOPATH=c:\nonexist-gopath -..\bin\go tool dist test --rebuild %* -if errorlevel 1 goto fail +..\bin\go tool dist test --rebuild %* || goto fail goto :eof :fail