>From: "Young, Jason (GE Infrastructure)" <[EMAIL PROTECTED]>
>Sent: Tuesday, October 12, 2004 7:25 PM


>I have a build system that records each step of a build process.  If a
>step succeeds, I add a row to a sql table with a status of 1.  If it
>fails, I add that row with a status of 0.  What is the easiest way to
>determine if a step succeeded or failed?  Expressions maybe?

By step, do you mean task, target, or something else?

If it's per target, then the easiest thing to do is to write your own task
that does the record, and invoke it at the end of every target.  It will
only be invoked if the preceding part of the task succeeded, so it knows
what to record.  You could then use the onfailure target to deal with the
failure.

I encourage you to think a bit more about what you're trying to accomplish.
What are you planning on doing with this data?  It's not uncommon for a NAnt
build file to have many small targets that always succeed and hence are
uninteresting.  It's also common to have tasks with failonerror set to
false, which creates a question as to whether you want to consider them as
having succeeded or failed?  In complex build systems, a given target can be
called several times, either because of it being invoked with a <call> task
or being included in subsidiary <nant> tasks.  So the simple question of
whether or not a given task or target succeeded isn't so simple.

Gary




-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to