forked from AutoMapper/AutoMapper
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathAutoMapper.build
131 lines (114 loc) · 6.4 KB
/
AutoMapper.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
<?xml version="1.0" ?>
<project name="AutoMapper" default="test" xmlns="http://nant.sf.net/schemas/nant.xsd">
<property name="build.dir" value="build" />
<property name="dist.dir" value="release" />
<property name="src.dir" value="src" />
<property name="tools.dir" value="tools" />
<property name="lib.dir" value="lib" />
<property name="nant.settings.currentframework" value="net-3.5" />
<property name="svn.executable" value="tools/subversion/svn.exe" dynamic="true" if="${not property::exists('svn.executable')}" />
<property name="revisionnumber" value="9999" dynamic="true"/>
<property name="project.fullversion" value="1.1.0.999" />
<property name="project.fullversion" value="${build.number}" if="${property::exists('build.number')}"/>
<property name="svnargs" value=" --non-interactive " />
<property name="config" value="Debug" />
<target name="test" depends="compile, run-unit-tests"
description="Compile and Run Tests" />
<target name="full" depends="clean, test, merge, dist" description="Compiles, tests, and produces distributions" />
<target name="ci" depends="clean, commonassemblyinfo, test, merge, dist" description="Compiles, tests, and produces distributions with versioning" />
<!-- User targets -->
<target name="clean" description="Delete Automated Build artifacts">
<delete dir="${build.dir}" if="${directory::exists(build.dir)}"/>
<delete dir="${dist.dir}" if="${directory::exists(dist.dir)}"/>
</target>
<target name="compile" description="Compiles using the AutomatedDebug Configuration">
<exec program="${framework::get-framework-directory(framework::get-target-framework())}\msbuild.exe"
commandline="src\AutoMapper.sln /t:Clean /t:Build /p:Configuration=Automated${config} /v:q /nologo" workingdir="." />
</target>
<target name="commonassemblyinfo">
<echo message="MARKING THIS BUILD AS VERSION ${project.fullversion}" />
<delete file="${src.dir}/CommonAssemblyInfo.cs" failonerror="false"/>
<asminfo output="${src.dir}/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="${project.fullversion}" />
<attribute type="AssemblyFileVersionAttribute" value="${project.fullversion}" />
<attribute type="AssemblyCopyrightAttribute" value="Copyright © Jimmy Bogard 2008-${datetime::get-year(datetime::now())}" />
<attribute type="AssemblyProductAttribute" value="${project::get-name()}" />
<attribute type="AssemblyCompanyAttribute" value="" />
<attribute type="AssemblyConfigurationAttribute" value="Debug" />
<attribute type="AssemblyInformationalVersionAttribute" value="${project.fullversion}" />
</attributes>
<references>
<include name="System.dll" />
</references>
</asminfo>
</target>
<target name="merge" depends="clean, compile, run-unit-tests">
<!--<msbuild project="src\ILMerge.MSBuild"/>-->
<mkdir dir="${build.dir}\merge" />
<mkdir dir="${build.dir}\merge-sl" />
<exec program="${tools.dir}\ILMerge\ilmerge.exe"
commandline="/v2 /log /out:"${build.dir}\merge\AutoMapper.dll" /internalize:AutoMapper.exclude "${build.dir}\${config}\AutoMapper\AutoMapper.dll" "${build.dir}\${config}\AutoMapper\Castle.Core.dll" "${build.dir}\${config}\AutoMapper\Castle.DynamicProxy2.dll" /keyfile:"${src.dir}\AutoMapper.snk"" workingdir="." />
<exec program="${tools.dir}\ILMerge\ilmerge.exe"
commandline="/targetplatform:v2,"${lib.dir}\Silverlight 3.0" /lib:"${lib.dir}\Silverlight 3.0" /log /out:"${build.dir}\merge-sl\AutoMapper.Silverlight.dll" /internalize:AutoMapper.exclude "${build.dir}\${config}\AutoMapper.Silverlight\AutoMapper.Silverlight.dll" "${build.dir}\${config}\AutoMapper.Silverlight\Castle.Core.dll" "${build.dir}\${config}\AutoMapper.Silverlight\Castle.DynamicProxy2.dll" /keyfile:"${src.dir}\AutoMapper.snk"" workingdir="." />-->
</target>
<!-- Internal targets -->
<target name="run-unit-tests">
<mkdir dir="${build.dir}\results" />
<nunit2 failonerror="true" verbose="true">
<formatter type="Xml" outputdir="${build.dir}\results" usefile="true" extension=".xml"/>
<formatter type="Plain" />
<test assemblyname="${build.dir}/${config}/UnitTests/AutoMapper.UnitTests.dll"/>
</nunit2>
<nunit2 failonerror="true" verbose="true">
<formatter type="Xml" outputdir="${build.dir}\results" usefile="true" extension=".xml"/>
<formatter type="Plain" />
<test assemblyname="${build.dir}/${config}/UnitTests.Silverlight/AutoMapper.UnitTests.Silverlight.dll"/>
</nunit2>
</target>
<target name="dist">
<mkdir dir="${dist.dir}" />
<copy todir="${build.dir}\dist-merged">
<fileset basedir="${build.dir}\merge">
<include name="**\*"/>
<exclude name="**\*.pdb" />
</fileset>
</copy>
<copy todir="${build.dir}\dist">
<fileset basedir="${build.dir}\${config}\AutoMapper">
<include name="**\*"/>
<exclude name="**\*.pdb" />
</fileset>
</copy>
<copy todir="${build.dir}\dist-sl-merged">
<fileset basedir="${build.dir}\merge-sl">
<include name="**\*"/>
<exclude name="**\*.pdb" />
</fileset>
</copy>
<copy todir="${build.dir}\dist-sl">
<fileset basedir="${build.dir}\${config}\AutoMapper.Silverlight">
<include name="**\*"/>
<exclude name="**\*.pdb" />
</fileset>
</copy>
<zip zipfile="${dist.dir}\AutoMapper-unmerged.zip">
<fileset basedir="${build.dir}\dist">
<include name="**\*" />
</fileset>
</zip>
<copy file="${build.dir}\dist-merged\AutoMapper.dll" tofile="${dist.dir}\AutoMapper.dll" />
<zip zipfile="${dist.dir}\AutoMapper.Silverlight-unmerged.zip">
<fileset basedir="${build.dir}\dist-sl">
<include name="**\*" />
</fileset>
</zip>
<copy file="${build.dir}\dist-sl-merged\AutoMapper.Silverlight.dll" tofile="${dist.dir}\AutoMapper.Silverlight.dll" />
</target>
</project>