Re: Using the Fail Task Conditionally

Adam Bruss <[email protected]> Wed, 13 Jul 2011 17:12:49 +0000
Newsgroups gmane.comp.windows.dotnet.nant.user
Message-ID <[email protected]>
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: [email protected]
W: http://www.awrcorp.com<http://www.awrcorp.com/>

From: Macdiarmid, James D. [mailto:[email protected]]
Sent: Wednesday, July 13, 2011 12:07 PM
To: [email protected]
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/nant-users