blob: 27fc53064f2a9fd3e7be716ff4d0b593c65e240a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
pub fn default_progress_format() -> String {
String::from("[{elapsed_precise}] ({percent:>3}%): {bar:40.cyan/blue} | {msg}")
}
pub fn default_spinner_format() -> String {
String::from("[{elapsed_precise}] {spinner} | {msg}")
}
pub fn default_package_print_format() -> String {
String::from(indoc::indoc!(r#"
{{i}} - {{p.name}} : {{p.version}}
{{~ #if print_any }}
==================================
{{~#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~}}
{{~ /if ~}}
"#))
}
pub fn default_strict_script_interpolation() -> bool {
true
}
pub fn default_script_shebang() -> String {
String::from("#!/bin/bash")
}
pub fn default_build_error_lines() -> usize {
10
}
|