-
Notifications
You must be signed in to change notification settings - Fork 44
/
build.cmd
33 lines (25 loc) · 1012 Bytes
/
build.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
@echo off
setlocal
:: Check prerequisites
set _msbuildexe="%ProgramFiles(x86)%\MSBuild\14.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% set _msbuildexe="%ProgramFiles%\MSBuild\14.0\Bin\MSBuild.exe"
if not exist %_msbuildexe% echo Error: Could not find MSBuild.exe. Please see https://github.com/Microsoft/vipr/wiki/Developer%%20Guide for build instructions. && exit /b 2
:: Log build command line
set _buildprefix=echo
set _buildpostfix=^> "%~dp0build.log"
call :build %*
:: Build
set _buildprefix=
set _buildpostfix=
call :build %*
goto :AfterBuild
:build
%_buildprefix% %_msbuildexe% "%~dp0build.proj" /nologo /maxcpucount /verbosity:minimal /nodeReuse:false /fileloggerparameters:Verbosity=diag;LogFile="%~dp0build.log";Append %* %_buildpostfix%
set BUILDERRORLEVEL=%ERRORLEVEL%
goto :eof
:AfterBuild
echo.
:: Pull the build summary from the log file
findstr /ir /c:".*Warning(s)" /c:".*Error(s)" /c:"Time Elapsed.*" "%~dp0build.log"
echo Build Exit Code = %BUILDERRORLEVEL%
exit /b %BUILDERRORLEVEL%