Skip to content

Commit

Permalink
Added NAnt build script
Browse files Browse the repository at this point in the history
  • Loading branch information
irverbitskiy committed Apr 16, 2012
1 parent 58ce9ae commit 3d549f2
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
48 changes: 48 additions & 0 deletions Faker.Net.build
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
<?xml version="1.0"?>
<project name="Faker.NET" default="build" basedir=".">
<description>Faker.NET</description>

<property name="mode" value="Release" unless="${property::exists('mode')}" />
<property name="output" value="./bin/${mode}" readonly="true" />
<property name="debug" value="true" if="${mode == 'Debug'}" readonly="true" />
<property name="debug" value="false" if="${mode == 'Release'}" readonly="true" />

<echo message="Build Mode: ${mode}" />
<echo message="Output: ${output}" />

<target name="build">
<echo message="Building Faker.Net" />
<csc target="library" debug="${debug}" output="${output}/Faker.dll">
<sources>
<include name="./Faker.Net/*.cs" />
<include name="./Faker.Net/Extensions/*.cs" />
<include name="./Faker.Net/Properties/AssemblyInfo.cs" />
</sources>
</csc>
</target>

<target name="test" depends="build">
<echo message="Building Faker.Net unit-tests" />
<csc target="library" debug="${debug}" output="${output}/Faker.Tests.dll">
<references>
<include name="${output}/Faker.dll" />
<include name="./NUnit/nunit.framework.dll" />
</references>
<sources>
<include name="./Faker.Net.NUnit.Tests/*.cs" />
<include name="./Faker.Net.NUnit.Tests/Properties/AssemblyInfo.cs" />>
</sources>
</csc>

<echo message="Running Faker.Net unit-tests" />
<nunit2>
<formatter type="Plain" />
<test assemblyname="${output}/Faker.Tests.dll" />
</nunit2>
</target>

<target name="clean">
<echo message="Cleaning ${output}" />
<delete dir="${output}" includeemptydirs="true" />>
</target>
</project>
18 changes: 18 additions & 0 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,29 @@ Relies on ideas taken from Rob Conery's and Jon Wingfield's excellent sugar libr
Supports .NET Framework and Mono.


Building
------------------------------------------------

nant build
nant build -D:mode=Debug

Tests
------------------------------------------------

There is a project in the solution named Faker.Net.NUnit.Tests that uses the relevant ffaker tests written in Ruby to test the .NET code.

NAnt command to run unit-tests

nant test
nant test -D:mode=Debug


Cleaning build output
-------------------------------------------------

nant clean
nant clean -D:mode=Debug


Contrib
------------------------------------------------
Expand Down

0 comments on commit 3d549f2

Please sign in to comment.