summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Beyer <matthias.beyer@atos.net>2021-07-27 16:36:36 +0200
committerMatthias Beyer <matthias.beyer@atos.net>2021-07-27 16:36:36 +0200
commit6c018b14d1ddd2d1d89e62b2e1488ccbcebbaf49 (patch)
tree1beee301f7658e05ba338217d311d73caab5821e
parent1b575fc3582d8105aebf372a0470cd8c57d94ec2 (diff)
parenta1e759348fe9184ec6f234a91d1d6d80468cdcfa (diff)
Merge branch 'package-print-format'
-rw-r--r--src/config/util.rs81
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 ~}}
- "#
+ "#
))
}