-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile.toml.liquid
79 lines (69 loc) · 1.65 KB
/
Makefile.toml.liquid
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
78
79
[env]
CARGO_MAKE_EXTEND_WORKSPACE_MAKEFILE = true
CARGO_MAKE_WORKSPACE_EMULATION = true
CARGO_MAKE_CRATE_WORKSPACE_MEMBERS = [
{%- if platform == "web" -%}
"launchers/wasm"
{%- endif -%}
{%- if platform == "pc" -%}
"launchers/native"
{%- endif -%}
{%- if platform == "all" -%}
"launchers/wasm",
"launchers/native"
{%- endif -%}
]
[config]
default_to_workspace = true
skip_core_tasks = true
skip_git_env_info = true
skip_rust_env_info = true
skip_crate_env_info = true
[tasks.default]
alias = "check"
[tasks.clean]
description = "Clean all target directory"
command = "cargo"
args = ["clean"]
[tasks.fmt]
description = "Check format quality"
command = "cargo"
args = ["fmt", "--all", "--", "--check"]
[tasks.fix-fmt]
description = "Fix format"
command = "cargo"
args = ["fmt", "--all"]
[tasks.clippy]
description = "Check code quality"
env_files = ["${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/.env"]
command = "cargo"
args = ["clippy", "--", "-D", "warnings"]
[tasks.test]
description = "Check all unit test"
env_files = ["${CARGO_MAKE_WORKSPACE_WORKING_DIRECTORY}/.env"]
command = "cargo"
args = ["test"]
dependencies = ["fmt", "clippy"]
[tasks.check]
description = "Check all issues, format and code quality"
dependencies = ["fmt", "clippy"]
[tasks.fix-all]
description = "Try fix all clippy and format issues"
dependencies = ["fix-fmt", "fix-clippy"]
[tasks.build]
description = "Generate release binary/lib"
dependencies = [
"fmt",
"clippy",
"test",
"release-native",
"release-web",
]
{% case platform %}
{% when "web" %}
[tasks.dev]
run_task.name = "run-web"
{% when "pc","all" %}
[tasks.dev]
run_task.name = "run-native"
{% endcase %}