-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathproject.build
47 lines (40 loc) · 2.3 KB
/
project.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
<?xml version="1.0" ?>
<project name="QuickBooks" default="build">
<property name="nant.settings.currentframework" value="net-3.5" />
<property name="dir.base" value="${directory::get-current-directory()}" />
<property name="dir.bin" value="${dir.base}\bin" />
<property name="dir.test" value="${dir.base}\tests" />
<property name="file.project" value="${dir.base}\src\Quickbooks.Net\QuickBooks.csproj" />
<property name="file.project.test" value="${dir.base}\src\Quickbooks.Net.Tests\Quickbooks.Net.Tests.csproj" />
<property name="file.test.dll.name" value="QuickBooks.Net.Tests.dll" />
<property name="file.publish" value="${dir.base}\publish.zip" />
<property name="tool.MbUnit" value="${dir.base}\lib\MbUnit\MbUnit.Cons.exe" />
<target name="build" depends="clean, compile" />
<target name="publish" depends="test, build, zip" />
<target name="clean" description="deletes folders used in the build">
<delete dir="${dir.bin}" if="${directory::exists(dir.bin)}" />
<delete dir="${dir.test}" if="${directory::exists(dir.test)}" />
<delete file="${file.publish}" if="${file::exists(file.publish)}" />
</target>
<target name="compile" description="compiles the project">
<exec program="${framework::get-framework-directory(framework::get-target-framework())}\msbuild.exe"
commandline=""${file.project}" /p:Configuration=Release;OutputPath="${dir.bin}\\"" />
</target>
<target name="zip" description="zips the contents of the bin folder to the zip.dir">
<zip zipfile="${file.publish}">
<fileset basedir="${dir.bin}">
<include name="**/*" />
</fileset>
</zip>
</target>
<target name="compile-test-project" description="compiles the test project">
<exec program="${framework::get-framework-directory(framework::get-target-framework())}\msbuild.exe"
commandline=""${file.project.test}" /p:OutputPath="${dir.test}\bin\\"" />
</target>
<target name="test" depends="clean, compile-test-project" description="runs all the tests">
<exec program="${tool.MbUnit}"
commandline=""${dir.test}\bin\${file.test.dll.name}" /report-folder:"${dir.test}\reports\\" /report-type:Html" />
<!-- clean up the created directories if the unittests passed -->
<call target="clean" />
</target>
</project>