| 8 | |
| 9 | == File Format == |
| 10 | |
| 11 | Build recipes are written in a custom XML-based format. Recipe files have a single {{{<recipe>}}} root element with one or more {{{<step>}}} child elements. The steps are executed in the order they appear in the recipe. A {{{<step>}}} element will consist of any number of commands and reports. These elements are declared in XML namespaces, where the namespace URL is a pseudo-protocol that defines which Python module they are implemented in: |
| 12 | {{{ |
| 13 | #!xml |
| 14 | <?xml version="1.0"?> |
| 15 | <recipe description="My project" |
| 16 | xmlns:python="bitten:bitten.recipe.pythontools"> |
| 17 | |
| 18 | <step id="build" description="Compile to byte code"> |
| 19 | <pthon:distutils command="build"/> |
| 20 | </step> |
| 21 | |
| 22 | <step id="test" description="Run unit tests"> |
| 23 | <pthon:distutils command="unittest"/> |
| 24 | <reports> |
| 25 | <python:unittest file="build/test-results.xml"/> |
| 26 | <python:trace summary="build/test-coverage.txt" |
| 27 | coverdir="build/coverage" include="trac*" exclude="*.tests.*"/> |
| 28 | </reports> |
| 29 | </step> |
| 30 | |
| 31 | </recipe> |
| 32 | }}} |