Skip to content

Commit 0ffdaaf

Browse files
author
Alexander Weber
committed
env var injector
1 parent 3d4d229 commit 0ffdaaf

1 file changed

Lines changed: 59 additions & 53 deletions

File tree

docs/wiki/content/docs/configuration/_index.adoc

Lines changed: 59 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -17,53 +17,59 @@ The `complate` configuration schema written in YAML. It includes a version numbe
1717
```
1818
version: 0.10
1919
templates:
20-
one:
21-
content:
22-
file: ./.complate/templates/arbitraty-template-file.tpl
23-
values:
24-
a.summary:
25-
static: "random summary"
26-
two:
27-
content:
28-
inline: |-
29-
{{ a.alpha }}
30-
{{ b.bravo }}
31-
{{ c.charlie }}
32-
{{ d.delta }}
33-
{{ e.echo }}
34-
values:
35-
a.alpha:
36-
prompt: "alpha"
37-
b.bravo:
38-
shell: "printf bravo"
39-
c.charlie:
40-
static: "charlie"
41-
d.delta:
42-
select:
43-
text: Select the version level that shall be incremented
44-
options:
45-
alpha:
46-
display: alpha
47-
value:
48-
static: alpha
49-
bravo:
50-
display: bravo
51-
value:
52-
shell: printf bravo
53-
e.echo:
54-
check:
55-
text: Select the components that are affected
56-
separator: ", "
57-
options:
58-
alpha:
59-
display: alpha
60-
value:
61-
static: alpha
62-
bravo:
63-
display: bravo
64-
value:
65-
shell: printf bravo
66-
20+
zero:
21+
content:
22+
inline: |-
23+
{{ a.alpha }}
24+
values:
25+
a.alpha:
26+
env: ALPHA
27+
one:
28+
content:
29+
file: ./.complate/templates/arbitraty-template-file.tpl
30+
values:
31+
a.summary:
32+
static: "random summary"
33+
two:
34+
content:
35+
inline: |-
36+
{{ a.alpha }}
37+
{{ b.bravo }}
38+
{{ c.charlie }}
39+
{{ d.delta }}
40+
{{ e.echo }}
41+
values:
42+
a.alpha:
43+
prompt: "alpha"
44+
b.bravo:
45+
shell: "printf bravo"
46+
c.charlie:
47+
static: "charlie"
48+
d.delta:
49+
select:
50+
text: Select the version level that shall be incremented
51+
options:
52+
alpha:
53+
display: alpha
54+
value:
55+
static: alpha
56+
bravo:
57+
display: bravo
58+
value:
59+
shell: printf bravo
60+
e.echo:
61+
check:
62+
text: Select the components that are affected
63+
separator: ", "
64+
options:
65+
alpha:
66+
display: alpha
67+
value:
68+
static: alpha
69+
bravo:
70+
display: bravo
71+
value:
72+
shell: printf bravo
6773
```
6874

6975
The first tag has the current version of the configuration schema. It needs to be equal to the major version number of the cli program. Since `complate` is still sub-one, the versioning is not yet stable and therefore, the major *and* minor version need to be equal to the ones of the cli program. +
@@ -76,13 +82,13 @@ You can resolve the value for each variable individual. Following options are av
7682

7783
[cols="1,1,1,1"]
7884
|===
79-
|Key|Behaviour|Input|Remark
80-
85+
|Key|Behaviour|Input|Remark|
86+
|env|Retrieves value from the specified env var|None||None|
8187
|static|Simply replaces the variable with a static value |None|
82-
|prompt|Asks the user for text input (can be empty)|The prompt|
83-
|shell|Invokes a shell command to resolve the variable (read from `STDOUT`)|None|See `shell security`
84-
|select|Asks the user to select one item from a list|`text`: string (context), `options`: list (available options to select from)|
85-
|check|Asks the user to select `0..n` item(s) from a list (multiselect)|`text`: string (context), `options`: list of options {display: str, value: str} (the available options to select from)|
88+
|prompt|Asks the user for text input (can be empty)|The prompt||
89+
|shell|Invokes a shell command to resolve the variable (read from `STDOUT`)|None|See `shell security`|
90+
|select|Asks the user to select one item from a list|`text`: string (context), `options`: list (available options to select from)||
91+
|check|Asks the user to select `0..n` item(s) from a list (multiselect)|`text`: string (context), `options`: list of options {display: str, value: str} (the available options to select from)||
8692
|===
8793

8894
#### Shell security

0 commit comments

Comments
 (0)