Repository navigation
sequence Task
nathanscottdaniels edited this page Oct 16, 2016
·
3 revisions
The sequence task is identical to the parallel task with the exception that it executes all targets sequentially instead of in parallel. By itself, this task serves no purpose and its primary use is as a nested element within a <parallel> task.
The task has the following attributes (there are no required attributes):
-
name: Allows you to give a name to the task. This serves both to increase build script readability and is also used by pNAnt when logging to the console. -
description: Allows you to describe this task to improve buildscript readability. Unlikename, the value of this attribute is ignored by pNAnt. -
if: Same as theifattrubute of other NAnt tasks. -
unless: Same as theunlessattrubute of other NAnt tasks. - __'failonerror
__: Same as thefailonerror` of other NAnt tasks.
The sequence task supports three nested element types which are used to specify the actions that should be performed in sequence. See the parallel task page for more details on these elements.
<pcall/><sequence/><parallel/>
A simple example that calls three targets in sequence. This is identical to using three <call/> tasks.
<sequence name="Simple Example">
<pcall target="target_alpha"/>
<pcall target="${target_name}" if="${some_condition}" />
<pcall target="target_charlie" unless="${some_condition"/>
</sequence>
See the parallel task page for more examples.