-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathbuild.cmd
50 lines (45 loc) · 2.25 KB
/
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
46
47
48
49
50
@if not defined _echo @echo off
setlocal enabledelayedexpansion
set BatchFile=%0
set Root=%~dp0
set BuildConfiguration=Debug
set PropRootSuffix=
set OptBuild=$true
set OptRebuild=$false
set OptDeploy=$true
set OptIntegrationTest=$false
set OptLog=$false
:ParseArguments
if "%1" == "" goto :DoneParsing
if /I "%1" == "/?" call :Usage && exit /b 1
if /I "%1" == "/build" set OptBuild=$true&&set OptRebuild=$false&&shift&& goto :ParseArguments
if /I "%1" == "/rebuild" set OptBuild=$false&&set OptRebuild=$true&&shift&& goto :ParseArguments
if /I "%1" == "/debug" set BuildConfiguration=Debug&&shift&& goto :ParseArguments
if /I "%1" == "/release" set BuildConfiguration=Release&&shift&& goto :ParseArguments
if /I "%1" == "/restore-only" set OptBuild=$false&&set OptDeploy=$false&&shift&& goto :ParseArguments
if /I "%1" == "/no-deploy-extension" set OptDeploy=$false&&shift&& goto :ParseArguments
if /I "%1" == "/diagnostic" set OptLog=$true&&shift&& goto :ParseArguments
if /I "%1" == "/rootsuffix" set PropRootSuffix=/p:RootSuffix=%2&&shift&&shift&& goto :ParseArguments
call :Usage && exit /b 1
:DoneParsing
powershell -ExecutionPolicy ByPass %Root%eng\common\Build.ps1 -configuration %BuildConfiguration% -restore -build:%OptBuild% -rebuild:%OptRebuild% -deploy:%OptDeploy% -integrationTest:%OptIntegrationTest% -binaryLog:%OptLog% %PropRootSuffix%
exit /b %ERRORLEVEL%
:Usage
echo Usage: %BatchFile% [/build^|/rebuild] [/debug^|/release] [/skiptests] [/no-deploy-extension] [/diagnostic] [/integrationtests] [/rootsuffix hive]
echo.
echo Build targets:
echo /build Perform a build (default)
echo /rebuild Perform a clean, then build
echo.
echo Configurations:
echo /debug Perform debug build (default)
echo /release Perform release build
echo.
echo Build options:
echo /restore-only Restore dependencies only
echo /skiptests Does not run unit tests
echo /diagnostic Turns on logging to a binlog
echo /rootsuffix Visual Studio hive to deploy VSIX extensions to (default is ProjectSystem)
echo /no-deploy-extension Does not deploy VSIX extensions when building the solution
echo /integrationtests Runs integration tests
goto :eof