main
cmd 45 lines 1.16 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\libs\%_C%
14
15 :: Clean
16
17 @if "%_INC%"=="" call :clean
18 @if NOT "%_CLEAN%"=="" goto :end
19
20 @echo Building libs %_C%
21
22 msbuild -Restore libs_t.proj -p:Configuration=%_C% -tl -nologo -m -warnaserror -bl:%_L%\libs_build.binlog || exit /b
23
24 dotnet test ^
25 %_B%\net6.0\WixToolsetTest.Versioning.dll ^
26 %_B%\x86\DUtilUnitTest.dll ^
27 %_B%\x64\DUtilUnitTest.dll ^
28 --nologo -l "trx;LogFileName=%_L%\TestResults\libs.trx" || exit /b
29
30 @goto :end
31
32 :clean
33 @rd /s/q "..\..\build\libs" 2> nul
34 @del "..\..\build\artifacts\WixToolset.DUtil.*.nupkg" 2> nul
35 @del "..\..\build\artifacts\WixToolset.Versioning.*.nupkg" 2> nul
36 @del "..\..\build\artifacts\WixToolset.WcaUtil.*.nupkg" 2> nul
37 @del "%_L%\TestResults\libs.trx" 2> nul
38 @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.dutil" 2> nul
39 @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.versioning" 2> nul
40 @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.wcautil" 2> nul
41 @exit /b
42
43 :end
44 @popd
45 @endlocal