Skip to content

Commit c855afe

Browse files
author
Alexander Weber
committed
cleanup
1 parent 9d748c2 commit c855afe

File tree

3 files changed

+7
-84
lines changed

3 files changed

+7
-84
lines changed

.complate/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 0.14
1+
version: 0.15
22
templates:
33
zero:
44
content:

src/config.rs

Lines changed: 5 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
use {
2-
indoc::indoc,
3-
std::collections::{
4-
BTreeMap,
5-
HashMap,
6-
},
1+
use std::collections::{
2+
BTreeMap,
3+
HashMap,
74
};
85

96
#[derive(Debug, serde::Serialize, serde::Deserialize, schemars::JsonSchema)]
@@ -67,80 +64,6 @@ pub enum VariableDefinition {
6764
},
6865
}
6966

70-
pub async fn default_config() -> String {
71-
indoc! {
72-
r#"version: 0.13
73-
templates:
74-
zero:
75-
content:
76-
inline: |-
77-
{{ a.alpha }}
78-
{{ b.bravo }}
79-
variables:
80-
a.alpha:
81-
static: alpha
82-
b.bravo: arg
83-
84-
one:
85-
content:
86-
file: ./.complate/templates/arbitraty-template-file.tpl
87-
variables:
88-
a.pwd:
89-
env: "PWD"
90-
two:
91-
content:
92-
inline: |-
93-
{{ a.alpha }}
94-
{{ b.bravo }}
95-
{{ c.charlie }}
96-
{{ d.delta }}
97-
{{ e.echo }}
98-
variables:
99-
a.alpha:
100-
prompt: "alpha"
101-
b.bravo:
102-
shell: "printf bravo"
103-
c.charlie:
104-
static: "charlie"
105-
d.delta:
106-
select:
107-
text: Select the version level that shall be incremented
108-
options:
109-
alpha:
110-
display: alpha
111-
value:
112-
static: alpha
113-
bravo:
114-
display: bravo
115-
value:
116-
shell: printf bravo
117-
e.echo:
118-
check:
119-
text: Select the components that are affected
120-
separator: ", "
121-
options:
122-
alpha:
123-
display: alpha
124-
value:
125-
static: alpha
126-
bravo:
127-
display: bravo
128-
value:
129-
shell: printf bravo
130-
f.foxtrot:
131-
env: "FOXTROT"
132-
three:
133-
content:
134-
inline: |-
135-
{{ test }}
136-
{{ _decode "dGVzdA==" }}
137-
helpers:
138-
"_decode": printf "$(printf $VALUE | base64 -D)"
139-
variables:
140-
test:
141-
static: "test"
142-
"#
143-
144-
}
145-
.into()
67+
pub async fn default_config() -> &'static str {
68+
include_str!("../.complate/config.yaml")
14669
}

test/.complate/config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version: 0.13
1+
version: 0.15
22
templates:
33
"var:static":
44
content:

0 commit comments

Comments
 (0)