-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.cmd
63 lines (47 loc) · 1.7 KB
/
build.cmd
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
@echo off
set FRAMEWORK_PATH=C:/WINDOWS/Microsoft.NET/Framework/v4.0.30319
set PATH=%PATH%;%FRAMEWORK_PATH%;
:target_config
set TARGET_CONFIG=Release
IF x==%1x goto framework_version
set TARGET_CONFIG=%1
:framework_version
set FRAMEWORK_VERSION=v4.0
if x==%2x goto build
set FRAMEWORK_VERSION=%2
:build
set publish=publish-%FRAMEWORK_VERSION%
if exist output ( rmdir /s /q output )
if exist %publish% ( rmdir /s /q %publish% )
mkdir output
mkdir "output\bin"
mkdir "output\lib"
mkdir "output\test"
echo === COMPILING ===
echo Compiling / Target: %FRAMEWORK_VERSION% / Config: %TARGET_CONFIG%
msbuild /nologo /verbosity:quiet src\Muster.sln /p:Configuration=%TARGET_CONFIG% /t:Clean
msbuild /nologo /verbosity:quiet src\Muster.sln /p:Configuration=%TARGET_CONFIG% /p:TargetFrameworkVersion=%FRAMEWORK_VERSION% /p:SignAssembly=true /p:AssemblyOriginatorKeyFile=..\Muster.snk
xcopy /Q /Y src\Muster\bin\%TARGET_CONFIG%\*.* output\lib
echo .xml >> exclude.txt
xcopy /Q /Y /EXCLUDE:exclude.txt src\Muster.Test\bin\%TARGET_CONFIG%\*.* output\test
echo .Test.dll >> exclude.txt
xcopy /Q /Y /EXCLUDE:exclude.txt src\Muster\bin\%TARGET_CONFIG%\*.* output\lib
xcopy /Q /Y /EXCLUDE:exclude.txt src\Muster\bin\%TARGET_CONFIG%\*.* output\bin
echo .vshost.exe >> exclude.txt
echo .manifest >> exclude.txt
echo .config >> exclude.txt
xcopy /Q /Y /EXCLUDE:exclude.txt src\Muster.Runner\bin\%TARGET_CONFIG%\*.* output\bin
del exclude.txt
if %TARGET_CONFIG%==Debug goto finalize
:finalize
echo.
echo === FINALIZING ===
move output %publish%
echo.
echo === CLEANUP ===
echo Cleaning Build
msbuild /nologo /verbosity:quiet src/Muster.sln /p:Configuration=%TARGET_CONFIG% /t:Clean
echo.
echo === DONE ===
:done
if errorlevel 1 pause else exit