forked from openstacknetsdk/openstack.net
-
Notifications
You must be signed in to change notification settings - Fork 27
/
build.cmd
45 lines (38 loc) · 975 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
34
35
36
37
38
39
40
41
42
43
44
45
@echo off
setlocal
:: Parse the arguments
IF "%1"=="/?" ( GOTO :help )
IF "%1"=="help" ( GOTO :help )
:parse
IF NOT "%1"=="" (
IF /I "%1"=="/Configuration" (
SET ConfigArg=/p:Configuration=%2
) ELSE (
SET TargetArg=/t:%1
SHIFT
GOTO :parse
)
)
:: Load the environment of the most recent version of Visual Studio installed
if not defined VisualStudioVersion (
if defined VS140COMNTOOLS (
call "%VS140COMNTOOLS%\VsDevCmd.bat"
goto :build
)
if defined VS120COMNTOOLS (
call "%VS120COMNTOOLS%\VsDevCmd.bat"
goto :build
)
echo Error: build.cmd requires Visual Studio 2013 or 2015.
exit /b 1
)
:build
msbuild build\build.proj %TargetArg% %ConfigArg% /nologo
exit /b %ERRORLEVEL%
:help
echo build.cmd [Build^|UnitTest^|IntegrationTest^|Documentation^|Package] [/Configuration Debug^|Release]
echo.
echo Examples:
echo build.cmd
echo build.cmd UnitTest
echo build.cmd Package /Configuration Release