Skip to content

Commit 2738eae

Browse files
committed
chore: change from shell runner to duckscript runner
1 parent 8caaede commit 2738eae

File tree

1 file changed

+58
-62
lines changed

1 file changed

+58
-62
lines changed

Makefile.toml

Lines changed: 58 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -11,83 +11,96 @@ command = "cargo"
1111
args = ["test"]
1212

1313
[tasks.build]
14-
script_runner = "@shell"
14+
script_runner = "@duckscript"
1515
script = '''
16-
domains=(llm)
16+
domains = array llm
1717
1818
# if there is no domain passed run for every domain
19-
if [ -z $1 ]; then
20-
for domain in ${domains[@]};
21-
do
22-
cargo make --cwd $domain build;
23-
done
19+
if is_empty ${1}
20+
for domain in ${domains}
21+
exec cargo make --cwd ${domain} build
22+
end
2423
else
25-
cargo make --cwd $1 build
26-
fi
24+
exec cargo make --cwd ${1} build
25+
end
2726
'''
2827

2928
[tasks.release-build]
30-
script_runner = "@shell"
29+
script_runner = "@duckscript"
3130
script = '''
32-
domains=(llm)
31+
domains = array llm
3332
3433
# if there is no domain passed run for every domain
35-
if [ -z $1 ]; then
36-
for domain in ${domains[@]};
37-
do
38-
cargo make --cwd $domain release-build;
39-
done
34+
if is_empty ${1}
35+
for domain in ${domains}
36+
exec cargo make --cwd ${domain} release-build
37+
end
4038
else
41-
cargo make --cwd $1 release-build
42-
fi
39+
exec cargo make --cwd ${1} release-build
40+
end
4341
'''
4442

4543
[tasks.build-portable]
46-
script_runner = "@shell"
44+
script_runner = "@duckscript"
4745
script = '''
48-
domains=(llm)
46+
#!/bin/bash
47+
domains = array llm
4948
5049
# if there is no domain passed run for every domain
51-
if [ -z $1 ]; then
52-
for domain in ${domains[@]};
53-
do
54-
cargo make --cwd $domain build-portable;
55-
done
50+
if is_empty ${1}
51+
for domain in ${domains}
52+
exec cargo make --cwd ${domain} build-portable
53+
end
5654
else
57-
cargo make --cwd $1 build-portable
58-
fi
55+
exec cargo make --cwd ${1} build-portable
56+
end
5957
'''
6058

6159
[tasks.release-build-portable]
62-
script_runner = "@shell"
60+
script_runner = "@duckscript"
6361
script = '''
64-
domains=(llm)
62+
#!/bin/bash
63+
domains = array llm
6564
6665
# if there is no domain passed run for every domain
67-
if [ -z $1 ]; then
68-
for domain in ${domains[@]};
69-
do
70-
cargo make --cwd $domain release-build-portable;
71-
done
66+
if is_empty ${1}
67+
for domain in ${domains}
68+
exec cargo make --cwd ${domain} release-build-portable
69+
end
7270
else
73-
cargo make --cwd $1 release-build-portable
74-
fi
71+
exec cargo make --cwd ${1} release-build-portable
72+
end
7573
'''
7674

7775
[tasks.wit]
78-
script_runner = "@shell"
76+
script_runner = "@duckscript"
77+
script = '''
78+
domains = array llm
79+
80+
# if there is no domain passed run for every domain
81+
if is_empty ${1}
82+
for domain in ${domains}
83+
exec cargo make --cwd ${domain} wit
84+
end
85+
else
86+
exec cargo make --cwd ${1} wit
87+
end
88+
'''
89+
90+
[tasks.build-test-components]
91+
description = "Builds all test components with golem-cli"
92+
script_runner = "@duckscript"
7993
script = '''
80-
domains=(llm)
94+
domains = array llm
8195
8296
# if there is no domain passed run for every domain
83-
if [ -z $1 ]; then
84-
for domain in ${domains[@]};
85-
do
86-
cargo make --cwd $domain wit;
87-
done
97+
if is_empty ${1}
98+
for domain in ${domains}
99+
exec cargo make --cwd ${domain} build-test-components
100+
end
88101
else
89-
cargo make --cwd $1 wit
90-
fi
102+
exec cargo make --cwd ${1} build-test-components
103+
end
91104
'''
92105

93106
[tasks.build-all]
@@ -118,23 +131,6 @@ cm_run_task release-build-portable
118131
cm_run_task copy-release-artifacts --portable
119132
'''
120133

121-
[tasks.build-test-components]
122-
description = "Builds all test components with golem-cli"
123-
script_runner = "@shell"
124-
script = '''
125-
domains=(llm)
126-
127-
# if there is no domain passed run for every domain
128-
if [ -z $1 ]; then
129-
for domain in ${domains[@]};
130-
do
131-
cargo make --cwd $domain build-test-components;
132-
done
133-
else
134-
cargo make --cwd $1 build-test-components
135-
fi
136-
'''
137-
138134
[tasks.copy-debug-artifacts]
139135
script_runner = "@duckscript"
140136
script = '''

0 commit comments

Comments
 (0)