-
-
Notifications
You must be signed in to change notification settings - Fork 122
/
build_with_packaging.bat
81 lines (62 loc) · 2.12 KB
/
build_with_packaging.bat
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
@echo off
setlocal EnableDelayedExpansion
rem Calculate start time
set started_at=%time%
set /a started_at_ms=%started_at:~0,2%*24*60*100+%started_at:~3,2%*60*100+%started_at:~6,2%*100+%started_at:~9,2%
echo:
echo:# Starting: ALL...
echo:[started at %started_at%]
echo:
echo:## Starting: Clean, Restore and Build...
echo:
dotnet clean -v:m
dotnet build -c:Release -v:m
if %ERRORLEVEL% neq 0 goto :error
echo:
echo:## Finished: Clean, Restore and Build
echo:
echo:## Starting: TestRunners for .NET 8.0 and .NET FRAMEWORK 4.7.2...
echo:
echo:### .NET 8.0 - Default rules (interpretation, then compilation)
dotnet run --no-build -f:net8.0 -c:Release --project test/DryIoc.TestRunner/DryIoc.TestRunner.csproj
echo:
echo:### .NET 8.0 - Compilation only
dotnet run -f:net8.0 -c:Release -p:GeneratePackageOnBuild=false -p:UseCompilationOnly=true --project test/DryIoc.TestRunner/DryIoc.TestRunner.csproj
echo:
echo:
echo:### .NET FRAMEWORK 4.7.2 - Default rules (interpretation, then compilation)
dotnet run --no-build -c:Release --project test/DryIoc.TestRunner.net472/DryIoc.TestRunner.net472.csproj
if %ERRORLEVEL% neq 0 goto :error
echo:
echo:### .NET FRAMEWORK 4.7.2 - Compilation only
dotnet run -c:Release -p:GeneratePackageOnBuild=false -p:UseCompilationOnly=true --project test/DryIoc.TestRunner.net472/DryIoc.TestRunner.net472.csproj
if %ERRORLEVEL% neq 0 goto :error
echo:
echo:
echo:## Finished: TestRunners
echo:
echo:## Starting: Documentation generation
echo:
dotnet build docs\DryIoc.Docs\DryIoc.Docs.csproj -f:net7.0 -target:MdGenerate
echo:
echo:## Finished: Documentation generation
echo:
echo:## Starting: Packaging NuGet for source packages
echo:
call build\NugetPack.bat
if %ERRORLEVEL% neq 0 goto :error
echo:
echo:## Finished: Packaging
echo:
rem Calculate elapsed time
set finished_at=%time%
set /a finished_at_ms=%finished_at:~0,2%*24*60*100+%finished_at:~3,2%*60*100+%finished_at:~6,2%*100+%finished_at:~9,2%
set /a ellapsed_ms=%finished_at_ms%*10-%started_at_ms%*10
echo:
echo:[finished at %finished_at%, elapsed: %ellapsed_ms% ms]
echo:# Finished: ALL Successful
exit /b 0
:error
echo:
echo:# Finished: Something failed :-(
exit /b 1