forked from structuremap/structuremap
-
Notifications
You must be signed in to change notification settings - Fork 1
/
cruise.build
162 lines (128 loc) · 6.03 KB
/
cruise.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
152
153
154
155
156
157
158
159
160
161
162
<project name="StructureMap" default="all">
<loadtasks assembly="bin/nant/extensions/common/2.0/NAntExtensions.TeamCity.dll" />
<property name="build.dir" value="build" />
<property name="deployment.dir" value="source\StructureMap.Testing.DeploymentTasks\"/>
<property name="results.dir" value="results" />
<property name="nant.dir" value="bin\nant" />
<property name="project.version" value="2.6.2" />
<property name="project.config" value="release" />
<property name="archive.dir" value="archive"/>
<target name="all" depends="compile, unit-test, post-clean"/>
<target name="release" depends="compile, post-clean"/>
<target name="ci" depends="compile, unit-test, post-clean, archive" />
<target name="pre-clean">
<delete dir="${build.dir}" failonerror="false" />
<delete dir="${results.dir}" failonerror="false"/>
<delete dir="${archive.dir}" failonerror="false" />
<mkdir dir="${build.dir}" />
<mkdir dir="${results.dir}" />
<mkdir dir="${archive.dir}" />
<call target="cleanJunk" />
</target>
<target name="cleanJunk">
<delete failonerror="false">
<fileset basedir=".">
<include name="source/**/obj/**"/>
<include name="source/**/bin**"/>
<include name="**/_ReSharper*"/>
<include name="source/**/*.resharperoptions"/>
</fileset>
</delete>
</target>
<target name="version" description="mark AssemblyInfo builds with the build number">
<property name="assembly-version" value="${project.version}.0000" />
<property name="file-version" value="${project.version}.0000" />
<if test="${environment::variable-exists('BUILD_NUMBER')}">
<property name="file-version" value="${project.version}.${environment::get-variable('BUILD_NUMBER')}" />
<tc-buildnumber build-number="${file-version}" />
</if>
<asminfo output="Source/CommonAssemblyInfo.cs" language="CSharp">
<imports>
<import namespace="System" />
<import namespace="System.Reflection" />
<import namespace="System.Runtime.InteropServices" />
</imports>
<attributes>
<attribute type="ComVisibleAttribute" value="false" />
<attribute type="AssemblyVersionAttribute" value="${assembly-version}" />
<attribute type="AssemblyCopyrightAttribute" value="Copyright (c) 2003-20010, Jeremy D. Miller" />
<attribute type="AssemblyProductAttribute" value="StructureMap" />
<attribute type="AssemblyCompanyAttribute" value="" />
<attribute type="AssemblyConfigurationAttribute" value="${project.config}" />
<attribute type="AssemblyInformationalVersionAttribute" value="${file-version}" />
<attribute type="AssemblyFileVersionAttribute" value="${file-version}" />
</attributes>
<references>
<include name="System.dll" />
</references>
</asminfo>
</target>
<target name="compile" depends="pre-clean,version">
<exec program="${nant.settings.currentframework.frameworkdirectory}\msbuild.exe" commandline="source\StructureMap.sln /t:rebuild /p:Configuration=Release">
</exec>
<copy todir="${build.dir}" flatten="true" overwrite="true">
<fileset basedir="source\">
<include name="**\bin\${project.config}\*.dll" />
<include name="**\bin\${project.config}\*.exe" />
<include name="**\bin\${project.config}\*.pdb" />
<include name="**\bin\${project.config}\*.xml" />
<include name="**\bin\${project.config}\*.xml.actual" />
<include name="StructureMap.Testing\*.config" />
</fileset>
</copy>
<copy todir="${build.dir}\..\" flatten="true" overwrite="true">
<fileset basedir="source\">
<include name="StructureMap.Testing\StructureMap.config" />
</fileset>
</copy>
</target>
<target name="unit-test">
<property name="nunit-console.exe" value="bin\NUnit\nunit-console.exe" />
<exec program="${nunit-console.exe}" workingdir="${build.dir}">
<arg value="StructureMap.Testing.dll" />
</exec>
<exec program="${nunit-console.exe}" workingdir="${build.dir}">
<arg value="StructureMap.DebuggerVisualizers.Testing.exe" />
</exec>
</target>
<target name="runDoctor">
<echo message="Running StructureMapDoctor" />
<copy file="source\StructureMap.Testing\TestData\ObjectMother.config" todir="build" verbose="true"/>
<exec
program="${build.dir}\StructureMapDoctor.exe"
workingdir="."
commandline="${build.dir}\ObjectMother.config -All"/>
<delete file="build/ObjectMother.config" />
</target>
<target name="post-clean">
<delete dir="deploy" failonerror="false" />
<mkdir dir="deploy" />
<copy todir="deploy" flatten="true" overwrite="true">
<fileset basedir="source\StructureMap.Testing\bin\${project.config}">
<include name="StructureMap.dll" />
<include name="StructureMap.pdb" />
<include name="StructureMap.xml" />
<include name="StructureMap.AutoMocking.dll" />
<include name="StructureMap.AutoMocking.xml" />
<include name="StructureMap.AutoFactory.dll" />
</fileset>
</copy>
<copy todir="deploy" file="bin\Moq.dll"/>
<copy todir="deploy" file="bin\Rhino.Mocks.dll"/>
<copy todir="deploy" file="bin\Castle.DynamicProxy-2.2\bin\net-35\Castle.Core.dll"/>
<copy todir="deploy" file="bin\Castle.DynamicProxy-2.2\bin\net-35\Castle.DynamicProxy2.dll"/>
<copy todir="deploy" file="StructureMap.chm"/>
<copy todir="deploy" file="LICENSE.TXT"/>
<copy todir="deploy" file="Source\StructureMapDoctor\bin\${project.config}\StructureMapDoctor.exe" />
<call target="cleanJunk" />
</target>
<target name="archive" depends="version">
<if test="${environment::variable-exists('TEAMCITY_PROJECT_NAME')}">
<zip zipfile="${archive.dir}\StructureMap_${file-version}.zip">
<fileset basedir="deploy">
<include name="*.*" />
</fileset>
</zip>
</if>
</target>
</project>