You'd use conditional property assignment.

First set the default property value, then conditionally re-assign it if
your condition is met. So:

<property name="some.target" value="some.target2" />
<property name="some.target" value="some.target1" if="${CCNetBuildCondition
== 'ForceBuild'}"/>

---
X

Continuous improvement is better than delayed perfection. - Mark Twain


On Wed, Nov 2, 2011 at 1:51 PM, Chris Fouts <chris.fo...@caemilusa.com>wrote:

> Sorry, CCNetBuildCondition****
>
> ** **
>
> *-------------------------------------------------------*
>
> I’m using ccnet and Nant, not a unique situation.****
>
> ** **
>
> How can I test the passed-in CCNetBuildModification string in Nant so I
> can do the following pseudo-code****
>
> ** **
>
> If ”${CCNetBuildModification} == “ForceBuild”****
>
>     <property name=”someTarget” value=”someTarget1” />****
>
> Else****
>
>     <property name=”someTarget” value=”someTarget2” />****
>
> ** **
>
> -chris****
>
>
>
> ***This e-mail message is intended only for the above named recipient(s)
> and may contain information that is sensitive or proprietary. If you have
> received this message in error or are not the named recipient(s), please
> immediately notify the sender, delete this e-mail message without making
> a copy and do not disclose or relay this e-mail message to anyone.***
>
>
> ------------------------------------------------------------------------------
> RSA(R) Conference 2012
> Save $700 by Nov 18
> Register now
> http://p.sf.net/sfu/rsa-sfdev2dev1
> _______________________________________________
> NAnt-users mailing list
> NAnt-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nant-users
>
>
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to