diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-12-08 10:55:36 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-12-08 10:55:36 +0100 |
commit | e65dcc4cab8211b0cc06218e3482c340cb673d0b (patch) | |
tree | 2f345b2e0a03bbdc8a8df078f32a000c7748289c /src/config | |
parent | a517ad92c7b02c338e48a3e366688374e0777420 (diff) |
Enhance default package print format
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/config')
-rw-r--r-- | src/config/util.rs | 51 |
1 files changed, 48 insertions, 3 deletions
diff --git a/src/config/util.rs b/src/config/util.rs index 424c149..c1f302d 100644 --- a/src/config/util.rs +++ b/src/config/util.rs @@ -5,10 +5,55 @@ pub fn default_progress_format() -> String { pub fn default_package_print_format() -> String { String::from(indoc::indoc!(r#" {{i}} - {{p.name}} : {{p.version}} - {{#each p.sources}}Source: {{this.url}} - {{this.hash.hash}} ({{this.hash.type}}){{/each}} - {{#if print_build_deps}}Build Deps: {{ p.dependencies.build }} {{/if}} - {{#if print_runtime_deps}}Runtime Deps: {{ p.dependencies.runtime }} {{/if}} + ================================== + {{~#if print_sources}} + Sources: + {{#each p.sources ~}} + {{~@key}} = {{this.url}} - {{this.hash.hash}} ({{this.hash.type}}) + {{/each~}} + {{/if~}} + {{~#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}} + {{~#if print_patches}} + Patches: + {{#each p.patches}}{{this}}, + {{/each~}} + {{/if}} + {{~#if print_env}} + Environment: + {{#each p.environment}}{{@key}}={{this}} + {{/each~}} + {{/if~}} + {{~#if print_flags}} + Flags: + {{#each p.flags}}{{this}} + {{/each~}} + {{/if~}} + {{~#if print_deny_images}} + Denied on: + {{#each p.deny_on_images}}{{this}} + {{/each~}} + {{/if~}} + {{~#if print_phases}} + Phases: + {{#each p.phases}}{{@key}} + {{/each~}} + {{/if~}} + {{~#if print_script}} + {{script}} + {{/if~}} "#)) } |