Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

132 lines (114 sloc) 6.554 kb
<?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:&quot;${build.dir}\merge\AutoMapper.dll&quot; /internalize:AutoMapper.exclude &quot;${build.dir}\${config}\AutoMapper\AutoMapper.dll&quot; &quot;${build.dir}\${config}\AutoMapper\Castle.Core.dll&quot; &quot;${build.dir}\${config}\AutoMapper\Castle.DynamicProxy2.dll&quot; /keyfile:&quot;${src.dir}\AutoMapper.snk&quot;" workingdir="." />
<exec program="${tools.dir}\ILMerge\ilmerge.exe"
commandline="/targetplatform:v2,&quot;${lib.dir}\Silverlight 3.0&quot; /lib:&quot;${lib.dir}\Silverlight 3.0&quot; /log /out:&quot;${build.dir}\merge-sl\AutoMapper.Silverlight.dll&quot; /internalize:AutoMapper.exclude &quot;${build.dir}\${config}\AutoMapper.Silverlight\AutoMapper.Silverlight.dll&quot; &quot;${build.dir}\${config}\AutoMapper.Silverlight\Castle.Core.dll&quot; &quot;${build.dir}\${config}\AutoMapper.Silverlight\Castle.DynamicProxy2.dll&quot; /keyfile:&quot;${src.dir}\AutoMapper.snk&quot;" 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>
Jump to Line
Something went wrong with that request. Please try again.