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

147 lines (125 sloc) 5.585 kb
<?xml version="1.0" ?>
<project name="ExcelMapper" default="build" xmlns="http://nant.sf.net/schemas/nant.xsd">
<!-- PROPERTIES -->
<property name ="current.dir" value="${directory::get-current-directory()}" />
<property name="build.dir" value="build" />
<property name="release.dir" value="release" />
<property name="nunit-console.exe" value="tools\nunit\bin\nunit-console-x86.exe" />
<property name="excel.dir" value="Excel" />
<property name="include.dir" value="Templates\Include" />
<property name="lib.dir" value="lib" />
<property name="BuildDTOsFromExcel.exe" value="BuildDTOsFromExcel.exe" />
<property name="Excel.dir" value="src\Samples.Tests\Excel" />
<property name="tools.dir" value="tools" />
<property name="config" value="Debug" />
<!-- User targets -->
<target name="clean" description="Delete Automated Build artifacts">
<delete dir="${build.dir}" if="${directory::exists(build.dir)}"/>
<mkdir dir="${build.dir}" />
</target>
<target name="compile" depends="clean" description="Builds project">
<msbuild project="src\ExcelMapper.sln" target="Rebuild" verbosity="quiet">
<property name="Configuration" value="debug"/>
<property name="SolutionDir" value=".." />
<arg value="/nologo"/>
</msbuild>
<copy todir="${build.dir}" overwrite="true">
<fileset basedir="src\ExcelMapper\bin\${config}">
<include name="*.*" />
</fileset>
</copy>
<copy todir="${build.dir}" overwrite="true">
<fileset basedir="src\BuildDTOsFromExcel\bin\${config}">
<include name="*.*" />
</fileset>
</copy>
<copy todir="${build.dir}" overwrite="true">
<fileset basedir="src\ExcelMapper.Tests\bin\${config}">
<include name="*" />
<include name="**\*.*" />
</fileset>
</copy>
<copy todir="${build.dir}" overwrite="true">
<fileset basedir="src\BuildDTOsFromExcel.Tests\bin\${config}">
<include name="*" />
<include name="**\*.*" />
</fileset>
</copy>
<copy todir="${build.dir}" overwrite="true">
<fileset basedir="src\Samples.Tests\bin\${config}">
<include name="*" />
<include name="**\*.*" />
</fileset>
</copy>
</target>
<target name="ExcelMapperTests">
<exec program="${nunit-console.exe}" workingdir="${build.dir}">
<arg value="ExcelMapper.Tests.dll" />
<arg value="/xml:ExcelMapperTests.xml" />
<arg value="/nologo" />
</exec>
</target>
<target name="BuildDTOsFromExcelTests">
<exec program="${nunit-console.exe}" workingdir="${build.dir}">
<arg value="BuildDTOsFromExcel.Tests.dll" />
<arg value="/xml:BuildDTOsFromExcelTests.xml" />
<arg value="/nologo" />
</exec>
</target>
<target name="SamplesTests">
<exec program="${nunit-console.exe}" workingdir="${build.dir}">
<arg value="Samples.Tests.dll" />
<arg value="/xml:SamplesTests.xml" />
<arg value="/nologo" />
</exec>
</target>
<target name="updateSampleExcel" description="Update lib folder">
<exec program="${build.dir}\${BuildDTOsFromExcel.exe}" workingdir="${build.dir}">
<arg value="..\${Excel.dir}\*.xls" />
<arg value="..\${Excel.dir}\*.xlsx" />
</exec>
<copy todir="${lib.dir}" overwrite="true">
<fileset basedir="${build.dir}">
<include name="ExcelToDTOMapper.DTO.dll" />
</fileset>
</copy>
</target>
<target name="test" depends="ExcelMapperTests, BuildDTOsFromExcelTests, SamplesTests" />
<target name="build" depends="clean, compile, test, updateSampleExcel" description="Clean, Compile, run tests" />
<target name="full" depends="build, unmerged-release, release" description="Build and zip the distributable files" />
<target name="unmerged-release" depends="build">
<mkdir dir="${build.dir}\unmerged-release" />
<copy todir="${build.dir}\unmerged-release">
<fileset basedir="${build.dir}">
<include name="BuildDTOsFromExcel.exe" />
<include name="StructureMap.dll" />
<include name="Microsoft.Practices.ServiceLocation.dll" />
<include name="RunTimeCodeGenerator.dll" />
</fileset>
</copy>
<exec program="${tools.dir}\ILMerge\ilmerge.exe"
commandline="/log /out:&quot;${build.dir}\unmerged-release\ExcelMapper.dll&quot; &quot;${build.dir}\ExcelMapper.dll&quot; /keyfile:&quot;${current.dir}\ExcelMapper.snk&quot;" workingdir="." />
<delete file="${build.dir}\unmerged-release\ExcelMapper.pdb" />
<zip zipfile="${release.dir}\unmerged-excelmapper.zip">
<fileset basedir="${build.dir}\unmerged-release" prefix="unmerged-release">
<include name="**/*" />
</fileset>
</zip>
</target>
<target name="release" depends="build">
<mkdir dir="${build.dir}\release" />
<exec program="${tools.dir}\ILMerge\ilmerge.exe"
commandline="/log /out:&quot;${build.dir}\release\ExcelMapper.dll&quot; &quot;${build.dir}\ExcelMapper.dll&quot; &quot;${build.dir}\StructureMap.dll&quot; &quot;${build.dir}\Microsoft.Practices.ServiceLocation.dll&quot; &quot;${build.dir}\RunTimeCodeGenerator.dll&quot; /keyfile:&quot;${current.dir}\ExcelMapper.snk&quot;" workingdir="." />
<copy todir="${build.dir}\release">
<fileset basedir="${build.dir}">
<include name="BuildDTOsFromExcel.exe" />
</fileset>
</copy>
<delete file="${build.dir}\release\ExcelMapper.pdb" />
<zip zipfile="${release.dir}\excelmapper.zip">
<fileset basedir="${build.dir}\release" prefix="release">
<include name="**/*" />
</fileset>
</zip>
</target>
</project>
Jump to Line
Something went wrong with that request. Please try again.