Reputation: 5771
Is there any way to mix up the 'AND' and 'OR' operators in Cruisecontrol.net 1.6? My if condition goes like this:
if ((A="a" && a="a") || (B="b" && b="b"))
{
//Task to be done
}
Same thing when written in CC (The OR part):
<conditional>
<conditions>
<orCondition>
<conditions>
<compareCondition value1="A" evaluation="equal" value2="a" />
<compareCondition value1="B" evaluation="equal" value2="b" />
</conditions>
</orCondition>
</conditions>
<tasks>
<!--Task to be done-->
</tasks>
</conditional>
and when written in CC with the AND part:
<conditional>
<conditions>
<andCondition>
<conditions>
<compareCondition value1="a" evaluation="equal" value2="a" />
<compareCondition value1="b" evaluation="equal" value2="b" />
</conditions>
</andCondition>
</conditions>
<tasks>
<!--Task to be done-->
</tasks>
</conditional>
I want to write both of these as a single conditional operation. Is it possible?
Upvotes: 0
Views: 593
Reputation: 5771
Well, I figured it out myself... :)
<conditional>
<conditions>
<orCondition>
<conditions>
<andCondition>
<conditions>
<compareCondition value1="A" evaluation="equal" value2="a" />
<compareCondition value1="a" evaluation="equal" value2="a" />
</conditions>
</andCondition>
<andCondition>
<conditions>
<compareCondition value1="B" evaluation="equal" value2="b" />
<compareCondition value1="b" evaluation="equal" value2="b" />
</conditions>
</andCondition>
</conditions>
</orCondition>
</conditions>
<tasks>
<!--Task to be done-->
</tasks>
</conditional>
Upvotes: 1