Skip to content
Snippets Groups Projects
Commit ba156b0f authored by Tim Jaacks's avatar Tim Jaacks
Browse files

Confluence: check if variables are defined

parent cae6e282
No related branches found
No related tags found
1 merge request!344Build documentation in dedicated job
{%- if SUPPORTED_HARDWARE is defined %}
{%- for hardware in SUPPORTED_HARDWARE.split(',') | sort %} {%- for hardware in SUPPORTED_HARDWARE.split(',') | sort %}
{%- if hardware | trim | length %} {%- if hardware | trim | length %}
{{ hardware | trim | lower | replace(" ", "-")}} {{ hardware | trim | lower | replace(" ", "-")}}
{%- endif %} {%- endif %}
{%- endfor %} {%- endfor %}
{%- endif %}
...@@ -18,29 +18,35 @@ ...@@ -18,29 +18,35 @@
<tr> <tr>
<th><b>Architecture / Processor</b></th> <th><b>Architecture / Processor</b></th>
<td> <td>
{%- if MACHINE is defined %}
{%- for machine in MACHINE.split(' ') | sort %} {%- for machine in MACHINE.split(' ') | sort %}
<p>{{ machine }}</p> <p>{{ machine }}</p>
{%- endfor %} {%- endfor %}
{%- endif %}
</td> </td>
</tr> </tr>
<tr> <tr>
<th><b>Supported Hardware</b></th> <th><b>Supported Hardware</b></th>
<td> <td>
{%- if SUPPORTED_HARDWARE is defined %}
{%- for hardware in SUPPORTED_HARDWARE.split(',') | sort %} {%- for hardware in SUPPORTED_HARDWARE.split(',') | sort %}
{%- if hardware | trim | length %} {%- if hardware | trim | length %}
<p>{{ hardware | trim }}</p> <p>{{ hardware | trim }}</p>
{%- endif %} {%- endif %}
{%- endfor %} {%- endfor %}
{%- endif %}
</td> </td>
</tr> </tr>
<tr> <tr>
<th><b>Documentation</b></th> <th><b>Documentation</b></th>
<td> <td>
{%- if FILES_documentation is defined %}
{%- for doc_file in FILES_documentation.split(' ') | sort %} {%- for doc_file in FILES_documentation.split(' ') | sort %}
{%- if doc_file.endswith(".html") %} {%- if doc_file.endswith(".html") %}
<p><a href="{{ doc_file }}">{{ (doc_file | basename | splitext)[0] }}</a></p> <p><a href="{{ doc_file }}">{{ (doc_file | basename | splitext)[0] }}</a></p>
{%- endif %} {%- endif %}
{%- endfor %} {%- endfor %}
{%- endif %}
</td> </td>
</tr> </tr>
</tbody> </tbody>
...@@ -48,6 +54,7 @@ ...@@ -48,6 +54,7 @@
</ac:rich-text-body> </ac:rich-text-body>
</ac:structured-macro> </ac:structured-macro>
{%- if MACHINE is defined %}
{%- for machine in MACHINE.split(' ') | sort %} {%- for machine in MACHINE.split(' ') | sort %}
<h1>{{ machine }}</h1> <h1>{{ machine }}</h1>
<ul> <ul>
...@@ -60,3 +67,4 @@ ...@@ -60,3 +67,4 @@
{%- endfor %} {%- endfor %}
</ul> </ul>
{%- endfor %} {%- endfor %}
{%- endif %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment