forked from microsoft/terminal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bcz.cmd
55 lines (43 loc) · 1.46 KB
/
bcz.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
51
52
53
54
55
@echo off
rem bcz - Clean and build the project
rem This is another script to help Microsoft developers feel at home working on the openconsole project.
if (%_LAST_BUILD_CONF%)==() (
set _LAST_BUILD_CONF=%DEFAULT_CONFIGURATION%
)
set _MSBUILD_TARGET=Clean,Build
:ARGS_LOOP
if (%1) == () goto :POST_ARGS_LOOP
if (%1) == (dbg) (
echo Manually building debug
set _LAST_BUILD_CONF=Debug
)
if (%1) == (rel) (
echo Manually building release
set _LAST_BUILD_CONF=Release
)
if (%1) == (no_clean) (
set _MSBUILD_TARGET=Build
)
shift
goto :ARGS_LOOP
:POST_ARGS_LOOP
echo Starting build...
nuget.exe restore %OPENCON%\OpenConsole.sln
rem /p:AppxBundle=Never prevents us from building the appxbundle from the commandline.
rem We don't want to do this from a debug build, because it takes ages, so disable it.
rem if you want the appx, build release
set _APPX_ARGS=
if (%_LAST_BUILD_CONF%) == (Debug) (
echo Skipping building appx...
set _APPX_ARGS=/p:AppxBundle=false
) else (
echo Building Appx...
)
set _BUILD_CMDLINE=%MSBUILD% %OPENCON%\OpenConsole.sln /t:%_MSBUILD_TARGET% /m /p:Configuration=%_LAST_BUILD_CONF% /p:Platform=%ARCH% %_APPX_ARGS%
echo %_BUILD_CMDLINE%
%_BUILD_CMDLINE%
rem Cleanup unused variables here. Note we cannot use setlocal because we need to pass modified
rem _LAST_BUILD_CONF out to OpenCon.cmd later.
rem
set _MSBUILD_TARGET=
set _BIN_=%~dp0\bin\%PLATFORM%\%_LAST_BUILD_CONF%