1 @if not defined _echo @echo off
4 if /I [%1] == [] goto Usage
5 if /I [%1] == [build] goto ModuleBuild
6 if /I [%1] == [full] goto FullBuild
7 if /I [%1] == [dummy] goto DummyBuild
8 if /I [%1] == [pack] goto Pack
9 if /I [%1] == [clean] goto Clean
14 echo Usage: %0 [command] [args]
16 echo build [module] Build a specific module
17 echo full Build all modules in src/ directory
18 echo dummy Generate dummy assemblies of all modules
19 echo pack [version] Make a NuGet package with build artifacts
20 echo clean Clean all artifacts
26 echo No module specified.
29 call dotnet msbuild %~dp0build\build.proj /nologo /t:restore /p:Project=%2
30 call dotnet msbuild %~dp0build\build.proj /nologo /t:build /p:Project=%2
34 call dotnet msbuild %~dp0build\build.proj /nologo /t:clean
35 call dotnet msbuild %~dp0build\build.proj /nologo /t:restore
36 call dotnet msbuild %~dp0build\build.proj /nologo /t:build
40 call dotnet msbuild %~dp0build\build.proj /nologo /t:dummy
41 call dotnet msbuild %~dp0build\build.proj /nologo /t:afterdummy
46 call :GetUnixTime TIMESTAMP
47 if /I [%VERSION%] == [] set VERSION=5.0.0-local-%TIMESTAMP%
48 call dotnet msbuild %~dp0build\build.proj /nologo /t:pack /p:Version=%VERSION%
52 call dotnet msbuild %~dp0build\build.proj /nologo /t:clean
56 setlocal enableextensions
57 for /f %%x in ('wmic path win32_utctime get /format:list ^| findstr "="') do (
59 set /a z=(14-100%Month%%%100)/12, y=10000%Year%%%10000-z
60 set /a ut=y*365+y/4-y/100+y/400+(153*(100%Month%%%100+12*z-3)+2)/5+Day-719469
61 set /a ut=ut*86400+100%Hour%%%100*3600+100%Minute%%%100*60+100%Second%%%100
62 endlocal & set "%1=%ut%" & goto :EOF