From fa234ea8efa80f53d46640d308c5c4b30a3d15c5 Mon Sep 17 00:00:00 2001 From: Martin Drab Date: Tue, 20 Oct 2020 15:39:23 +0100 Subject: [PATCH] [build]: Better error detection --- scripts/build.bat | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/scripts/build.bat b/scripts/build.bat index 8cea3f2..47cd049 100644 --- a/scripts/build.bat +++ b/scripts/build.bat @@ -2,17 +2,18 @@ set CONFIG=%1% set "VSCMD_START_DIR=%CD%" call "c:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat" x86_x64 10.0 -vcvars_ver=14.2 MSBuild ..\irpmon.sln /m /Property:Configuration=%CONFIG% /Property:Platform=Win32 -if errorlevel 1 goto failure +if %errorlevel% NEQ 0 goto failure MSBuild ..\irpmon.sln /m /Property:Configuration=%CONFIG% /Property:Platform=x64 -if errorlevel 1 goto failure +if %errorlevel% NEQ 0 goto failure call rsvars +if %errorlevel% NEQ 0 goto failure MSBuild ../gui/irpmon.dproj /m /t:Build /p:config=%CONFIG% /p:platform=Win32 -if errorlevel 1 goto failure +if %errorlevel% NEQ 0 goto failure MSBuild ../gui/irpmon.dproj /m /t:Build /p:config=%CONFIG% /p:platform=Win64 -if errorlevel 1 goto failure +if %errorlevel% NEQ 0 goto failure goto success :failure -echo BUILD FAILED! +echo BUILD FAILED! Error code %errorlevel% :success