AspNetWebStack/build.cmd

41 строка
1.2 KiB
Batchfile
Исходник Обычный вид История

2012-03-11 21:17:56 +04:00
@echo off
pushd %~dp0
setlocal
2012-03-11 21:17:56 +04:00
if exist bin goto build
mkdir bin
:Build
REM Find the most recent 32bit MSBuild.exe on the system. If v12.0 (installed with VS2013) does not exist, fall back to
REM v4.0. Also handle x86 operating systems, where %ProgramFiles(x86)% is not defined. Always quote the %MSBuild% value
REM when setting the variable and never quote %MSBuild% references.
set MSBuild="%ProgramFiles(x86)%\MSBuild\12.0\Bin\MSBuild.exe"
if not exist %MSBuild% @set MSBuild="%ProgramFiles%\MSBuild\12.0\Bin\MSBuild.exe"
if not exist %MSBuild% @set MSBuild="%SystemRoot%\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe"
2012-03-11 21:17:56 +04:00
if "%1" == "" goto BuildDefaults
%MSBuild% Runtime.msbuild /m /nr:false /t:%* /p:Platform="Any CPU" /p:Desktop=true /v:M /fl /flp:LogFile=bin\msbuild.log;Verbosity=Normal
if %ERRORLEVEL% neq 0 goto BuildFail
2012-03-11 21:17:56 +04:00
goto BuildSuccess
:BuildDefaults
%MSBuild% Runtime.msbuild /m /nr:false /p:Platform="Any CPU" /p:Desktop=true /v:M /fl /flp:LogFile=bin\msbuild.log;Verbosity=Normal
if %ERRORLEVEL% neq 0 goto BuildFail
2012-03-11 21:17:56 +04:00
goto BuildSuccess
:BuildFail
echo.
echo *** BUILD FAILED ***
goto End
:BuildSuccess
echo.
echo **** BUILD SUCCESSFUL ***
goto end
:End
popd
endlocal