> I would expect this to be the operation... After all you are 
> testing for the existence of 'CCNetLabel', not 
> 'CCNetProject'. All this suggests to me is that you *do* have 
> a CCNetLabel... Perhaps you should be using that to set your 
> value instead?

I know I'm testing for the existence of netlabel, not netproject.
Perhaps I've misunderstood the purpose of the if and unless globally
applicable attributes.

"If true then the task will be executed; otherwise, skipped. The default
is true."
"Opposite of if. If false then the task will be executed; otherwise,
skipped. The default is false."

I read that to mean that in the below two lines, if CCNetLabel is
defined, the description will go to "Cruise control automated build of
projectXYZ", and if it's not, it will say "Release image of project XYZ"

The property does NOT exist, I'm running nant from the command line, not
from ccnet, so I expect that the first line will get killed, as the "if"
test fails, and the second line will get taken.  I was certainly not
expecting that the value="" portion of the first line would still get
evaluated, and throw errors if it failed.


<attribute type="AssemblyDescriptionAttribute"
if="${property::exists('CCNetLabel')}" value="CruiseControl automated
build of ${CCNetProject}" />
<attribute type="AssemblyDescriptionAttribute"
unless="${property::exists('CCNetLabel')}" value="Release Image of
${project::get-name()}" /> 


Cheers,
Karl P


_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to