In my Nant script, I would like to compare the value of a property with a known string. After reading the Nant Expressions documentation, I figured I could make a basic comparison of "==" to evaluate as logical.
However, given the script block:
<if test="${target.env} == Dev"> <echo message="***** You are using DEV"/> </if>
When I execute, I get the following error:
'Dev == Dev' is not a valid value for attribute 'test' of <if ... />. Cannot resolve 'Dev == Dev' to boolean value. String was not recognized as a valid Boolean.
It seems like it should be simple (and probably have). How to compare two strings or properties in Nant to evaluate as logical?
build-process nant
berko
source share