forked from nplant/nplant
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnplant.build
56 lines (49 loc) · 2.02 KB
/
nplant.build
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
<?xml version="1.0"?>
<project name="setupModuleDev" default="main" basedir=".">
<property name="do.git" value="false" readonly="false" /> <!-- teamcity pass false for this as the git pull is done by team city-->
<property name="sln.to.compile" value="NPlant.sln" readonly="false" />
<property name="config" value="Debug" readonly="false" />
<property name="git.dir" value="" readonly="false" />
<property name="nuget.dir" value=".nuget" readonly="false" />
<property name="do.delpackages" value="false" readonly="false" />
<target name="main">
<call target="git" if="${do.git}" />
<call target="delpackages" if="${do.delpackages}" />
<call target="nuget" />
<call target="compile" />
<call target="tests" />
</target>
<target name="git" description="Call git.exe to pull down the latest source">
<exec program="${git.dir}git.exe">
<arg value="pull" />
<arg value="origin" />
<arg value="master" />
</exec>
</target>
<target name="nuget" description="Call nuget to pull down all dependencies">
<exec program="${nuget.dir}\NuGet.exe">
<arg value="install" />
<arg value="${nuget.dir}\packages.config" />
<arg value="-OutputDirectory" />
<arg value=".\packages" />
</exec>
</target>
<target name="delpackages" description="Delete the local nuget folder">
<delete dir="${nuget.dir}\Packages}" />
</target>
<target name="compile" description="Compiles the solution passed in">
<exec program="${environment::get-variable('WinDir')}\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe">
<arg value="${sln.to.compile}" />
<arg value="/verbosity:detailed" />
<arg value="/p:Configuration=${config}" />
<arg value="/t:rebuild" />
</exec>
</target>
<target name="tests" description="Run on the NUnit tests in the solution">
<exec program=".\Packages\NUnit.Runners.2.6.2\tools\nunit-console.exe">
<arg value="Bin\${config}\NPlant.Tests.dll" />
<arg value="/xml:TestResults.xml" />
<arg value="/nologo" />
</exec>
</target>
</project>