main
cmd 55 lines 1.84 KB
Raw
1 @setlocal
2 @pushd %~dp0
3
4 @set _C=Debug
5 @set _L=%~dp0..\..\..\build\logs
6
7 :parse_args
8 @if /i "%1"=="release" set _C=Release
9 @if /i "%1"=="inc" set _INC=1
10 @if /i "%1"=="clean" set _CLEAN=1
11 @if not "%1"=="" shift & goto parse_args
12
13 @set _B=%~dp0..\..\..\build\Bal.wixext\%_C%
14
15 :: Clean
16
17 @if "%_INC%"=="" call :clean
18 @if NOT "%_CLEAN%"=="" goto :end
19
20 @echo Building ext\Bal %_C% using %_N%
21
22 :: Restore
23 :: Build
24 :: Pack
25 :: Note: This test project must be restored and built directly to get all its support files laid out correctly.
26 :: Everything else is built by the traversal project.
27 msbuild -Restore -p:Configuration=%_C% -tl -nologo -m -warnaserror test\WixToolsetTest.BootstrapperApplications\WixToolsetTest.BootstrapperApplications.csproj -bl:%_L%\ext_bal_build.binlog || exit /b
28
29 msbuild bal_t.proj -p:Configuration=%_C% -tl -nologo -warnaserror -bl:%_L%\bal_build.binlog || exit /b
30
31 :: Test
32 dotnet test ^
33 %_B%\x86\WixStdFnUnitTest.dll ^
34 %_B%\net6.0\WixToolsetTest.BootstrapperApplications.dll ^
35 --nologo -l "trx;LogFileName=%_L%\TestResults\bal.wixext.trx" || exit /b
36
37 @goto :end
38
39 :clean
40 @rd /s/q "..\..\..\build\Bal.wixext" 2> nul
41 @del "..\..\..\build\artifacts\WixToolset.Bal.wixext.*.nupkg" 2> nul
42 @del "..\..\..\build\artifacts\WixToolset.BootstrapperApplications.wixext.*.nupkg" 2> nul
43 @del "..\..\..\build\artifacts\WixToolset.WixStandardBootstrapperApplicationFunctionApi.*.nupkg" 2> nul
44 @del "%_L%\ext_bal_build.binlog" 2> nul
45 @del "%_L%\bal_fnsapi_build.binlog" 2> nul
46 @del "%_L%\bal_examples_build.binlog" 2> nul
47 @del "%_L%\TestResults\bal.wixext.trx" 2> nul
48 @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.bal.wixext" 2> nul
49 @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.bootstrapperapplications.wixext" 2> nul
50 @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.wixstandardbootstrapperapplicationfunctionapi" 2> nul
51 @exit /b
52
53 :end
54 @popd
55 @endlocal