Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

162 lines (128 sloc) 6.177 kB
<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.3" />
<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-20011, 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>
Jump to Line
Something went wrong with that request. Please try again.