diff options
author | kennyballou <kballou@onyx.boisestate.edu> | 2013-01-21 18:11:21 -0700 |
---|---|---|
committer | kennyballou <kballou@onyx.boisestate.edu> | 2013-01-21 18:11:21 -0700 |
commit | 9b7f8a34ae8a79ec4b099140a7536976cf6a510e (patch) | |
tree | 1592586af31ac5aa7c4162eae1b0bf15fa066220 /docs | |
parent | 9c9f8dd86839468142538d75d8ab5b72e46bad60 (diff) | |
download | xnt-9b7f8a34ae8a79ec4b099140a7536976cf6a510e.tar.gz xnt-9b7f8a34ae8a79ec4b099140a7536976cf6a510e.tar.xz |
Add section about return values to documentation
Diffstat (limited to 'docs')
-rw-r--r-- | docs/source/buildfile.rst | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/docs/source/buildfile.rst b/docs/source/buildfile.rst index 3867830..4a46233 100644 --- a/docs/source/buildfile.rst +++ b/docs/source/buildfile.rst @@ -69,6 +69,28 @@ purpose of the target, or what the target accomplishes when ran. Finally, we call ``mkdir`` of the ``xnt.tasks`` module. This function, if not obvious by the name, creates a directory named 'build' (see :doc:`taskreference`). +Return Values +------------- + +The targets you define can return an error code (or '0' for success) however +you see fit. Doing this will give you a status message at the end of the +invocation of Xnt that will inform you if the target ran successfully or not +given your criteria (or will just say it succeeded if you don't specify a +return value at all). For example:: + + @target + def foo(): + return 0 + +Will result in:: + + ... + Success + +Most tasks have been updated to return error codes as well to that you can +return what it returns. If you find any tasks that can be updated to behave +this way, please create an issue for it. + .. _runningXnt: Running Xnt |