diff options
author | Matthias Beyer <matthias.beyer@atos.net> | 2021-06-24 11:06:44 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2021-08-31 08:46:08 +0200 |
commit | 4d61118e78c6592d6519df5892a03ffe9ce3a5ec (patch) | |
tree | 2a1c0db754e34665c3c6898045eb5f312ca90471 | |
parent | 027c1f23f5221c7463b12086e1a77887d282e398 (diff) |
Fix package print format default
Maybe this is necessary because of the handlebars update, I am not entirely sure
(because it is actually a not-so-much-used feature). This patch styles the
default format string for the output to be more visually pleasing.
Signed-off-by: Matthias Beyer <matthias.beyer@atos.net>
Tested-by: Matthias Beyer <matthias.beyer@atos.net>
(cherry picked from commit a1e759348fe9184ec6f234a91d1d6d80468cdcfa)
-rw-r--r-- | src/config/util.rs | 81 |
1 files changed, 48 insertions, 33 deletions
diff --git a/src/config/util.rs b/src/config/util.rs index 132ae0d..59e3cad 100644 --- a/src/config/util.rs +++ b/src/config/util.rs @@ -26,63 +26,78 @@ pub fn default_package_print_format() -> String { String::from(indoc::indoc!( r#" {{i}} - {{p.name}} : {{p.version}} - {{~ #if print_any }} + {{~ #if print_any}} + ================================== - {{~#if print_sources}} + {{#if print_sources}} Sources: - {{#each p.sources ~}} - {{~@key}} = {{this.url}} - {{this.hash.hash}} ({{this.hash.type}}) - {{/each~}} + {{#each p.sources}} + {{@key}} = {{this.url}} - {{this.hash.hash}} ({{this.hash.type}}) + {{/each}} {{/if~}} - {{~#if print_dependencies}} + + {{#if print_dependencies}} Dependencies: - {{#if print_build_deps ~}} - {{~ #each p.dependencies.build}} - {{~ this}} (build) - {{/each ~}} - {{/if ~}} - {{~ #if print_runtime_deps ~}} - {{~ #each p.dependencies.runtime}} - {{~ this}} (runtime) - {{/each ~}} - {{/if ~}} + {{#if print_build_deps ~}} + {{#each p.dependencies.build}} + {{this}} (build) + {{/each}} {{/if}} - {{~#if print_patches}} - Patches: - {{#each p.patches}}{{this}}, - {{/each~}} + {{#if print_runtime_deps ~}} + {{#each p.dependencies.runtime}} + {{this}} (runtime) + {{/each}} {{/if}} - {{~#if print_env}} + {{/if~}} + + {{#if print_patches}} + Patches: + {{#each p.patches}} + {{this}}, + {{/each~}} + {{/if~}} + + {{#if print_env}} Environment: - {{#each p.environment}}{{@key}}={{this}} - {{/each~}} + {{#each p.environment}} + {{@key}}={{this}} + {{/each~}} {{/if~}} + {{~#if print_flags}} Flags: - {{#each p.flags}}{{this}} - {{/each~}} + {{#each p.flags}} + {{this}} + {{/each}} {{/if~}} + {{~#if print_allowed_images}} Only supported on: - {{#each p.allowed_images}}{{this}} - {{/each~}} + {{#each p.allowed_images}} + {{this}} + {{/each}} {{/if~}} + {{~#if print_denied_images}} Denied on: - {{#each p.denied_images}}{{this}} - {{/each~}} + {{#each p.denied_images}} + {{this}} + {{/each}} {{/if~}} - {{~#if print_phases}} + + {{#if print_phases}} Phases: - {{#each p.phases}}{{@key}} - {{/each~}} + {{#each p.phases}} + {{@key}} + {{/each}} {{/if~}} + {{~#if print_script}} {{script}} {{/if~}} {{~ /if ~}} - "# + "# )) } |