It matters. The fail task stops the build in its tracks so put the Mail before.

Adam Bruss
Senior Development Engineer
AWR Corporation
11520 N. Port Washington Rd., Suite 201
Mequon, WI  53092  USA
P: 1.262.240.0291 x104
F: 1.262.240.0294
E: abr...@awrcorp.com
W: http://www.awrcorp.com<http://www.awrcorp.com/>

From: Macdiarmid, James D. [mailto:james.d.macdiar...@saic.com]
Sent: Wednesday, July 13, 2011 12:07 PM
To: nant-users@lists.sourceforge.net
Subject: [NAnt-users] Using the Fail Task Conditionally


I'm using the "if" task in my build  script to test a condition.  If the 
condition is true, I want to send an email out then fail the build.  Does it 
matter where I put the "fail" task?  For example, should I put my "Mail" task 
first, then the "fail" task, or fail first then put the "Mail" task?

<If>

        <Mail>

        </Mail>

        <fail message=""></fail>

</if>

Or

<If>

        <fail message=""></fail>

        <Mail>

        </Mail>

</if>

Thanks,

Jim
------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to