forked from pjvds/ncqrs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
MAIN.build
151 lines (138 loc) · 5.54 KB
/
MAIN.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
<?xml version="1.0" ?>
<project name="NAnt Examples" xmlns="http://nant.sf.net/release/0.91-alpha1/nant.xsd" default="build">
<property name="nant.settings.currentframework" value="net-4.0" />
<property name="root.dir" value="" />
<property name="project.version" value="0.8.0" />
<property name="project.config" value="debug" />
<property name="msbuild" value="${framework::get-framework-directory(framework::get-target-framework())}\msbuild.exe" dynamic="true" />
<property name="release.dir" value="release" />
<property name="release.version" value="${project.version}" />
<if test="${property::exists('build.number')}">
<property name="release.version" value="${project.version}.${build.number}"/>
</if>
<target name="build">
<echo message="Building release ${release.version}" />
<call target="BuildFramework" />
<call target="RunTestsForFramework" />
<call target="BuildExtensions" />
<call target="MakeRelease" />
</target>
<target name="BuildFramework">
<echo message="START BUILDING FRAMEWORK" />
<!-- TODO: Solution target does not support 4.0 yet -->
<!-- <solution solutionfile="Framework\NcqrsFramework.sln" configuration="debug" />-->
<asminfo output="Framework\AssemblyInfo.cs" language="CSharp">
<imports>
<import namespace="System" />
<import namespace="System.Reflection" />
<import namespace="System.Runtime.CompilerServices" />
<import namespace="System.Runtime.InteropServices " />
</imports>
<attributes>
<attribute type="AssemblyTitleAttribute" value="Ncqrs" />
<attribute type="AssemblyDescriptionAttribute" value="The CQRS Framework for .NET" />
<attribute type="AssemblyVersionAttribute" value="${project.version}" />
<attribute type="CLSCompliantAttribute" value="true" />
<attribute type="ComVisibleAttribute" value="false" />
<attribute type="AssemblyCopyrightAttribute" value="Copyright (c) 2010, Ncqrs.org" />
<attribute type="InternalsVisibleToAttribute" value="Ncqrs.Tests" />
<attribute type="InternalsVisibleToAttribute" value="Ncqrs.Spec" />
</attributes>
<references>
<include name="System.dll" />
<include name="System.Core.dll" />
</references>
</asminfo>
<exec program="${msbuild}">
<arg value="Framework\NcqrsFramework.sln" />
<arg value="/p:Configuration=${project.config}" />
</exec>
<copy todir="${release.dir}">
<fileset basedir="lib\${project.config}">
<include name="Ncqrs.dll" />
<include name="Ncqrs.pdb" />
<include name="Ncqrs.xml" />
</fileset>
</copy>
<copy todir="${release.dir}">
<fileset basedir="lib\ThirdParty\json.net">
<include name="Newtonsoft.Json.dll" />
<include name="Newtonsoft.Json.pdb" />
</fileset>
</copy>
<copy todir="${release.dir}">
<fileset basedir="lib\ThirdParty\log4net">
<include name="log4net.dll" />
</fileset>
</copy>
</target>
<target name="BuildExtensions" depends="BuildFramework">
<exec program="${msbuild}">
<arg value="Extensions\NcqrsExtensions.sln" />
<arg value="/p:Configuration=${project.config}" />
<!--<arg value="/t:rebuild" />-->
</exec>
</target>
<target name="RunTestsForFramework" depends="BuildFramework">
<echo message="START RUNNING TESTS FOR FRAMEWORK" />
<!--<property name="dir.reports.nunit" value="${dir.reports}\NUnit\" />
<mkdir dir="${dir.reports.nunit}" unless="${directory::exists(dir.reports.nunit)}" />-->
<property name="nunit.input" value="lib\${project.config}\Ncqrs.Tests\Ncqrs.Tests.dll" />
<!--<property name="nunit.output" value="${dir.reports.nunit}\nunit-results.xml" />-->
<exec program="tools\nunit\nunit-console.exe" failonerror="true" workingdir="." verbose="true">
<arg value="${nunit.input}" />
<!--<arg value="/xml:${nunit.output}" />-->
<arg value="/framework:net-4.0" />
</exec>
<!--<nunit2>
<formatter type="Plain" />
<test assemblyname="lib\Debug\Ncqrs.Tests\Ncqrs.Tests.dll" />
</nunit2>-->
</target>
<target name="MakeRelease" depends="BuildFramework">
<!-- Start with a new release directory -->
<delete dir="${release.dir}" />
<copy todir="${release.dir}\Framework">
<fileset basedir="lib\${project.config}\Ncqrs">
<include name="Ncqrs.dll" />
<include name="Ncqrs.pdb" />
<include name="Ncqrs.xml" />
</fileset>
</copy>
<copy todir="${release.dir}\Framework">
<fileset basedir="lib\ThirdParty\json.net">
<include name="Newtonsoft.Json.dll" />
<include name="Newtonsoft.Json.pdb" />
</fileset>
</copy>
<copy todir="${release.dir}\Framework">
<fileset basedir="lib\ThirdParty\log4net">
<include name="log4net.dll" />
</fileset>
</copy>
<copy todir="${release.dir}\Spec">
<fileset basedir="lib\${project.config}\Ncqrs.Spec">
<include name="Ncqrs.Spec.dll" />
<include name="Ncqrs.Spec.pdb" />
<include name="Ncqrs.Spec.xml" />
</fileset>
</copy>
<copy todir="${release.dir}\Spec">
<fileset basedir="lib\ThirdParty\NUnit">
<include name="nunit.framework.dll" />
<include name="nunit.framework.xml" />
</fileset>
</copy>
<copy todir="${release.dir}\Extensions">
<fileset basedir="lib\${project.config}">
<include name="**/*" />
<exclude name="Ncqrs/*" /> <!-- Goes in the Framework directory. -->
</fileset>
</copy>
<zip zipfile="${release.dir}\Ncqrs${release.version}.zip">
<fileset basedir="${release.dir}">
<include name="**/*" />
</fileset>
</zip>
</target>
</project>