@echo Off
pushd %~dp0
setlocal

:Build
call npm install
call npm run check
call npm run build
call npm run lint
call npm run coverage:teamcity
call npm run integration-test
call npm run integration-test-stdin-windows

if %ERRORLEVEL% neq 0 goto BuildFail
goto BuildSuccess

:BuildFail
echo.
echo *** BUILD FAILED ***
goto End

:BuildSuccess
echo.
echo *** BUILD SUCCEEDED ***
goto End

:End
echo.
popd
exit /B %ERRORLEVEL%

@echo Off
pushd %~dp0
setlocal

:Build
call npm install
if %ERRORLEVEL% neq 0 goto BuildFail

call npm run check
if %ERRORLEVEL% neq 0 goto BuildFail

call npm run build
if %ERRORLEVEL% neq 0 goto BuildFail

call npm run lint
if %ERRORLEVEL% neq 0 goto BuildFail

call npm run coverage:teamcity
if %ERRORLEVEL% neq 0 goto BuildFail

call npm run integration-test
if %ERRORLEVEL% neq 0 goto BuildFail

call npm run integration-test-stdin-windows
if %ERRORLEVEL% neq 0 goto BuildFail

goto BuildSuccess

:BuildFail
echo.
echo *** BUILD FAILED ***
goto End

:BuildSuccess
echo.
echo *** BUILD SUCCEEDED ***
goto End

:End
echo.
popd
exit /B %ERRORLEVEL%

Build script should fail for problems
Build script should fail for problems
