@joebigelow / wix-1 / commits / 5c601223

Add clean to api.cmd and minor clean-up

Rob Mensching committed Aug 7, 2022 at 11:29 UTC 5c601223834cb8571d31232c7524ed3b6ed786e2
2 files changed +32 -6
src/api/api.cmd
+30 -4
@@ -3,25 +3,51 @@
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 _INCREMENTAL=1
10 +@if /i "%1"=="clean" set _INCREMENTAL= & set _CLEAN=1
11 @if not "%1"=="" shift & goto parse_args
12
13 @set _B=%~dp0..\..\build\api\%_C%
14
15 +:: Clean
16 +@if NOT "%_INCREMENTAL%"=="" call :clean
17 +@if NOT "%_CLEAN%"=="" goto :end
18 +
19 @echo Building api %_C%
20
14 -:: restore
15 -:: build
16 -:: pack
21 +:: Restore
22 +:: Build
23 +:: Pack
24
25 msbuild api_t.proj -p:Configuration=%_C% -nologo -m -warnaserror -bl:%_L%\api_build.binlog || exit /b
26
20 -:: test
27 +:: Test
28 dotnet test burn\test\WixToolsetTest.Mba.Core -c %_C% --nologo --no-build -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.Mba.Core.trx" || exit /b
29 dotnet test %_B%\x86\BalUtilUnitTest.dll --nologo -l "trx;LogFileName=%_L%\TestResults\BalUtilUnitTest.trx" || exit /b
30 dotnet test %_B%\x86\BextUtilUnitTest.dll --nologo -l "trx;LogFileName=%_L%\TestResults\BextUtilUnitTest.trx" || exit /b
31 dotnet test wix\api_wix.sln -c %_C% --nologo --no-build -l "trx;LogFileName=%_L%\TestResults\api_wix.trx" || exit /b
32
33 +@goto :end
34 +
35 +:clean
36 +@rd /s/q "..\..\build\api" 2> nul
37 +@del "..\..\build\artifacts\WixToolset.BalUtil.*.nupkg" 2> nul
38 +@del "..\..\build\artifacts\WixToolset.BextUtil.*.nupkg" 2> nul
39 +@del "..\..\build\artifacts\WixToolset.BootstrapperCore.Native.*.nupkg" 2> nul
40 +@del "..\..\build\artifacts\WixToolset.Data.*.nupkg" 2> nul
41 +@del "..\..\build\artifacts\WixToolset.Extensibility.*.nupkg" 2> nul
42 +@del "..\..\build\artifacts\WixToolset.Mba.Core.*.nupkg" 2> nul
43 +@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.balutil" 2> nul
44 +@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.bextutil" 2> nul
45 +@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.bootstrappercore.native" 2> nul
46 +@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.data" 2> nul
47 +@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.extensibility" 2> nul
48 +@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.mba.core" 2> nul
49 +@exit /b
50 +
51 +:end
52 @popd
53 @endlocal
src/tools/tools.cmd
+2 -2
@@ -17,7 +17,7 @@
17 @echo Building tools %_C%
18
19 :: Build
20 -msbuild -Restore tools.sln -p:Configuration=%_C% -nologo -m -warnaserror -bl:..\..\build\logs\tools_build.binlog || exit /b
20 +msbuild -Restore tools.sln -p:Configuration=%_C% -nologo -m -warnaserror -bl:%_L%\tools_build.binlog || exit /b
21
22 :: Publish
23 msbuild publish_t.proj -p:Configuration=%_C% -nologo -m -warnaserror -bl:%_L%\tools_publish.binlog || exit /b
@@ -26,7 +26,7 @@ msbuild publish_t.proj -p:Configuration=%_C% -nologo -m -warnaserror -bl:%_L%\to
26 dotnet test -c %_C% --no-build --nologo test\WixToolsetTest.HeatTasks -l "trx;LogFileName=%_L%\TestResults\WixToolsetTest.HeatTasks.trx" || exit /b
27
28 :: Pack
29 -msbuild -t:Pack WixToolset.Heat -p:Configuration=%_C% -p:NoBuild=true -nologo -m -warnaserror -bl:..\..\build\logs\tools_pack.binlog || exit /b
29 +msbuild -t:Pack WixToolset.Heat -p:Configuration=%_C% -p:NoBuild=true -nologo -m -warnaserror -bl:%_L%\tools_pack.binlog || exit /b
30
31 @goto :end
32