-
-
Notifications
You must be signed in to change notification settings - Fork 83
/
build.bat
55 lines (45 loc) · 1.25 KB
/
build.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
@echo off
setlocal EnableDelayedExpansion
echo: # BUILDING AND RUNNING THE TESTS IN RELEASE MODE
echo:
echo:
set "FrameworkParam=-f:net9.0"
set "LatestSupportedNetProp=-p:LatestSupportedNet=net9.0"
if [%1] NEQ [] (
set "FrameworkParam=-f:%1"
set "LatestSupportedNetProp=-p:LatestSupportedNet=%1"
)
echo:FrameworkParam == '%FrameworkParam%', LatestSupportedNetProp == '%LatestSupportedNetProp%'
echo:
echo:## Starting: RESTORE and BUILD...
echo:
dotnet clean -v:m %LatestSupportedNetProp%
dotnet build -v:m %LatestSupportedNetProp% -c:Release
if %ERRORLEVEL% neq 0 goto :error
echo:
echo:## Finished: RESTORE and BUILD
echo:
echo:## Starting: TESTS...
echo:
dotnet run --no-build %LatestSupportedNetProp% %FrameworkParam% -c:Release --project test/FastExpressionCompiler.TestsRunner
if %ERRORLEVEL% neq 0 goto :error
dotnet run --no-build -c:Release --project test/FastExpressionCompiler.TestsRunner.Net472
if %ERRORLEVEL% neq 0 goto :error
echo:
echo:## Finished: TESTS
echo:
echo:## Starting: SOURCE PACKAGING...
echo:
call BuildScripts\NugetPack.bat
if %ERRORLEVEL% neq 0 goto :error
echo:
echo:## Finished: SOURCE PACKAGING
echo:
echo:# Finished: ALL
echo:
exit /b 0
:error
echo:
echo:## :-( Failed with ERROR: %ERRORLEVEL%
echo:
exit /b %ERRORLEVEL%