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

Confluence: group download files by type

parent 3697b4ea
No related branches found
No related tags found
1 merge request!359Confluence: group download files by type
Pipeline #88151 passed with stage
in 26 minutes and 39 seconds
...@@ -54,17 +54,110 @@ ...@@ -54,17 +54,110 @@
</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> <h2>{{ machine }}</h2>
<ul> {#- see https://stackoverflow.com/questions/72654161/dynamically-referencing-a-variable-in-jinja2 #}
{#- see https://stackoverflow.com/questions/72654161/dynamically-referencing-a-variable-in-jinja2 #} {%- set SUPPORTED_HARDWARE_machine = self._TemplateReference__context.resolve('SUPPORTED_HARDWARE_' ~ machine | replace("-", "_")).split(',') | sort %}
{%- set FILES_machine = self._TemplateReference__context.resolve('FILES_' ~ machine | replace("-", "_")) -%} <h6>Supported Hardware: {% for hardware in SUPPORTED_HARDWARE_machine %}{% if hardware | trim | length %}{{ hardware | trim }}{{ ", " if not loop.last else "" }}{%- endif -%}{%- endfor -%}
{%- for machine_file in FILES_machine.split(' ') | sort %} </h6>
<li> {%- set FILES_machine = self._TemplateReference__context.resolve('FILES_' ~ machine | replace("-", "_")).split(' ') | sort %}
<p><a href="{{ machine_file }}">{{ (machine_file | basename) }}</a></p> {%- set used_files = [] %}
</li> <ac:structured-macro ac:name="expand">
{%- endfor %} <ac:parameter ac:name="title">Downloads</ac:parameter>
</ul> <ac:rich-text-body>
<table>
<tbody>
<tr>
<th><b>Image</b></th>
<td>
{%- set files = [] -%}
{%- for file in FILES_machine -%}
{%- if file.endswith(".tar.gz") -%}
{%- set _ = files.append(file) -%}
{%- set _ = used_files.append(file) -%}
{%- endif -%}
{%- endfor -%}
{%- for file in files -%}
<a href="{{ file }}">🔽 {{ (file | basename) }}</a>{{ "<br/>" if not loop.last else "" }}
{%- endfor -%}
</td>
</tr>
<tr>
<th><b>Install Script</b></th>
<td>
{%- set files = [] -%}
{%- for file in FILES_machine -%}
{%- if file.endswith("fng-install.sh") -%}
{%- set _ = files.append(file) -%}
{%- set _ = used_files.append(file) -%}
{%- endif -%}
{%- endfor -%}
{%- for file in files -%}
<a href="{{ file }}">🔽 {{ (file | basename) }}</a>{{ "<br/>" if not loop.last else "" }}
{%- endfor -%}
</td>
</tr>
<tr>
<th><b>SDK</b></th>
<td>
{%- set files = [] -%}
{%- for file in FILES_machine -%}
{%- if "toolchain" in file and file.endswith(".sh") -%}
{%- set _ = files.append(file) -%}
{%- set _ = used_files.append(file) -%}
{%- endif -%}
{%- endfor -%}
{%- for file in files -%}
<a href="{{ file }}">🔽 {{ (file | basename) }}</a>{{ "<br/>" if not loop.last else "" }}
{%- endfor -%}
</td>
</tr>
<tr>
<th><b>Device Trees</b></th>
<td>
{%- set files = [] -%}
{%- for file in FILES_machine -%}
{%- if file.endswith(".dtb") -%}
{%- set _ = files.append(file) -%}
{%- set _ = used_files.append(file) -%}
{%- endif -%}
{%- endfor -%}
{%- for file in files -%}
<a href="{{ file }}">🔽 {{ (file | basename) }}</a>{{ "<br/>" if not loop.last else "" }}
{%- endfor -%}
</td>
</tr>
<tr>
<th><b>Device Tree Overlays</b></th>
<td>
{%- set files = [] -%}
{%- for file in FILES_machine -%}
{%- if file.endswith(".dtbo") -%}
{%- set _ = files.append(file) -%}
{%- set _ = used_files.append(file) -%}
{%- endif -%}
{%- endfor -%}
{%- for file in files -%}
<a href="{{ file }}">🔽 {{ (file | basename) }}</a>{{ "<br/>" if not loop.last else "" }}
{%- endfor -%}
</td>
</tr>
<tr>
<th><b>Misc</b></th>
<td>
{%- set files = [] -%}
{%- for file in FILES_machine -%}
{%- if file not in used_files -%}
{%- set _ = files.append(file) -%}
{%- endif -%}
{%- endfor -%}
{%- for file in files -%}
<a href="{{ file }}">🔽 {{ (file | basename) }}</a>{{ "<br/>" if not loop.last else "" }}
{%- endfor -%}
</td>
</tr>
</tbody>
</table>
</ac:rich-text-body>
</ac:structured-macro>
{%- 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