There's no support for this in 0.8.4. To use expressions you need to use the
nightly build of NAnt available at:

http://nant.sourceforge.net/builds/

These releases are actually pretty stable and I use them on a daily basis.
You can now write:

<if test="${propertyname=='somevalue'}">
    ... tasks here ...
</if>

<task ... if="${propertyname=='somevalue'}" />

More information available at:

http://nant.sourceforge.net/nightly/help/fundamentals/expressions.html
http://nant.sourceforge.net/nightly/help/fundamentals/functions.html

The expression evaluator will be included in upcoming 0.8.5.

Jarek

----- Original Message ----- 
From: "Kirchhoff, Florian" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, May 04, 2004 7:58 PM
Subject: [Nant-users] Test non-bool value of a property


> Hi:
>
> I am using the 0.84 release of NAnt and I love it. However I don't seem
> to find a
> way to do something rather simple: Execute a task depending on the value
> of a property.
>
> How can this be done?
>
> The <if> task only support testing if a property exists or if it's true,
> what
> if that property is not a bool:
>
> <target name="sample>
> <sometask if="${env=='prod'}" .../>
> or
> <if test="${env=='prod'}" />
>
> </target>
>
> Thanks.
>
> Florian
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: Oracle 10g
> Get certified on the hottest thing ever to hit the market... Oracle 10g.
> Take an Oracle 10g class now, and we'll give you the exam FREE.
> http://ads.osdn.com/?ad_id149&alloc_id66&opĚk
> _______________________________________________
> Nant-users mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/nant-users
>



-------------------------------------------------------
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE.
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to