forked from lucasmeijer/cecil
-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.bat
36 lines (29 loc) · 1.11 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
set BASEDIR=%~dp0
set BUILDDIR=%BASEDIR%builds
set LIBDIR=%BUILDDIR%\lib
set LIBDIR35=%LIBDIR%\net35
set LIBDIR40=%LIBDIR%\net40
set MSBUILD="C:\Program Files (x86)\MSBuild\14.0\Bin\MSBuild.exe"
set SEVENZIP="C:\Program Files\7-Zip\7z.exe"
::Setup Directories
mkdir %BUILDDIR%
mkdir %LIBDIR%
mkdir %LIBDIR35%
mkdir %LIBDIR40%
::Create Version TXT
cd %BASEDIR%
type NUL > %BUILDDIR%\version.txt
@echo | set /p="Repository: " >> %BUILDDIR%\version.txt
git remote get-url origin >> %BUILDDIR%\version.txt
@echo | set /p="Branch: " >> %BUILDDIR%\version.txt
git branch >> %BUILDDIR%\version.txt
@echo | set /p="Commit: " >> %BUILDDIR%\version.txt
git log -n 1 --pretty=format:%%H >> %BUILDDIR%\version.txt
::Build Cecil for .NET 3.5
%MSBUILD% "%BASEDIR%\Mono.Cecil.sln" /t:Build /p:Configuration=net_3_5_Release /p:Platform="Any CPU" /p:OutputPath=%LIBDIR35%
call:CleanupBuild %LIBDIR35%
::Build Cecil for .NET 4.0
%MSBUILD% "%BASEDIR%\Mono.Cecil.sln" /t:Build /p:Configuration=net_4_0_Release /p:Platform="Any CPU" /p:OutputPath=%LIBDIR40%
call:CleanupBuild %LIBDIR40%
%SEVENZIP% a -m0=lzma -r %BASEDIR%/builds.7z %BUILDDIR%/*
goto:eof