NAnt Overriding properties from the console
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]
NAnt OS X Build Issues
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…
Mac OS X Terminal
I just read a post on Brad Wilson’s blog on customising your terminal. Here is the .profile file.
alias ls=’ls -G’
alias dir=’ls -l’
alias autofeature=’AUTOFEATURE=true autospec’
export PS1=”\e[0;34m[\$PWD]\e[0m ”
Comes with directory highlighting. Dont know why this is not the OS X default.
Awesome anyways.
Blair…