Archive

Posts Tagged ‘CI’

NAnt Overriding properties from the console

May 13, 2010 Leave a comment

If you have a property in your project which may change depending on a commandline switch you can override it using the -D:name=value commandline switch.

I the sample below I am overriding the property from the commandline.

<?xml version="1.0" encoding="utf-8"?>
<project name="nantexamples" default="cli-property-overrides" xmlns="http://nant.sf.net/release/0.86-beta1/nant.xsd">
	<property name="mode" value="default"/>
	<target name="cli-property-overrides">
		<echo message="The value of mode is ${mode}" />
	</target>
</project>

[/Users/blairdavidson/Projects/NantExamples] nant -D:mode=cli-value -buildfile:NantExamples.build
NAnt 0.86 (Build 0.86.2898.0; beta1; 8/12/2007)
Copyright (C) 2001-2007 Gerry Shaw
http://nant.sourceforge.net

Buildfile: file:///Users/blairdavidson/Projects/NantExamples/NantExamples.build
Target framework: Mono 2.0 Profile
Target(s) specified: cli-property-overrides

[property] Read-only property “mode” cannot be overwritten.

cli-property-overrides:

[echo] The value of mode is cli-value

BUILD SUCCEEDED – 0 non-fatal error(s), 1 warning(s)

Total time: 0 seconds.

[/Users/blairdavidson/Projects/NantExamples]

Categories: Development Tags: , , , , , ,

NAnt OS X Build Issues

May 13, 2010 Leave a comment

If you have errors with getting nant build scripts working with mono on Mac OS X add the following to your bashrc file.
export PATH=$PATH:/Library/Frameworks/Mono.framework/Commands/

This will address the following issue:
Expression: ${not pkg-config::exists(’mono’)}
^^^^^^^^^^^^^^^^^^^^^^^^^^

‘pkg-config’ failed to start.

Blair…

Categories: Development Tags: , , , ,

Is NAnt Dead?

March 12, 2010 Leave a comment
Categories: Development Tags: , , ,