From 65103bff223dd3ae54961e65140871db63b5fc25 Mon Sep 17 00:00:00 2001 From: zjybjtu Date: Tue, 13 Aug 2019 17:45:06 +0800 Subject: [PATCH] fix the windows bat issue. fix the windows bat, if the goproxy doesn't work. The go build will interrupt, but the bat still go on. Add the errorlevel to catch the error. --- bnd2/build.bat | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bnd2/build.bat b/bnd2/build.bat index 70c66dd..2327309 100644 --- a/bnd2/build.bat +++ b/bnd2/build.bat @@ -4,10 +4,12 @@ set GOOS=windows set GOARCH=amd64 go version go build -v -o electron/bnd2.exe -ldflags "-s -w -H=windowsgui" +if "%errorlevel%" == "1" goto :errorend set GOOS=darwin set GOARCH=amd64 go build -v -o electron/bnd2 -ldflags "-s -w" +if "%errorlevel%" == "1" goto :errorend echo Building UI cd electron @@ -15,3 +17,6 @@ node -v call npm -v call npm install && npm run dist cd .. + +:errorend +echo "Error in go build" -- GitLab