fix: Make containerfile formatting nicer
This commit is contained in:
parent
ea6143c7f7
commit
49d512b3f1
1 changed files with 15 additions and 15 deletions
|
|
@ -27,26 +27,26 @@ ARG CONFIG_DIRECTORY="/tmp/config"
|
|||
ARG IMAGE_NAME="{{ name }}"
|
||||
ARG BASE_IMAGE="{{ base_image }}"
|
||||
|
||||
{% macro run_modules(module) %}
|
||||
{% if module.type %}
|
||||
{% if module.type == "containerfile" %}
|
||||
{% for c in module.containerfiles %}
|
||||
{%- macro run_modules(module) %}
|
||||
{%- if module.type %}
|
||||
{%- if module.type == "containerfile" %}
|
||||
{%- for c in module.containerfiles %}
|
||||
{{ print_containerfile(containerfile = c ) }}
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
{%- endfor %}
|
||||
{%- else %}
|
||||
RUN chmod +x /tmp/modules/{{ module.type }}/{{ module.type }}.sh
|
||||
RUN source /tmp/exports.sh && OS_VERSION="$(grep -Po '(?<=VERSION_ID=)\d+' /usr/lib/os-release)" /tmp/modules/{{ module.type }}/{{ module.type }}.sh '{{ print_module_context(module = module) }}'
|
||||
{% endif %}
|
||||
{% elif module["from-file"] %}
|
||||
{% set extra_module = get_module_from_file(file = module["from-file"]) %}
|
||||
{% for m in extra_module.modules %}
|
||||
{%- endif %}
|
||||
{%- elif module["from-file"] %}
|
||||
{%- set extra_module = get_module_from_file(file = module["from-file"]) %}
|
||||
{%- for m in extra_module.modules %}
|
||||
{{ self::run_modules(module = m) }}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endmacro run_modules %}
|
||||
{%- endfor %}
|
||||
{%- endif %}
|
||||
{%- endmacro run_modules %}
|
||||
|
||||
{% for module in modules %}
|
||||
{%- for module in modules %}
|
||||
{{ self::run_modules(module = module) }}
|
||||
{% endfor %}
|
||||
{%- endfor %}
|
||||
|
||||
RUN rm -rf /tmp/* /var/* && ostree container commit
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue