-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.toml
103 lines (90 loc) · 1.94 KB
/
Makefile.toml
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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
[config]
default_to_workspace = false
[env]
CARGO_MAKE_COVERAGE_PROVIDER = "llvm-cov"
CARGO_MAKE_RUN_CODECOV = true
CARGO_NO_DEFAULT_FEATURES = "--no-default-features"
CARGO_MAKE_CARGO_BUILD_TEST_FLAGS = ""
[tasks.dev-test-flow]
dependencies = [
"pre-build",
"format-flow",
"clippy-flow",
"build",
"post-build",
"pre-docs",
"docs",
"post-docs",
"test-flow",
]
[tasks.pre-build]
dependencies = [
"sort-ci",
"format-toml-conditioned-flow",
]
[tasks.ci-flow]
dependencies = [
"pre-ci-flow",
"print-env-flow",
"pre-build",
"check-format-flow",
"clippy-flow",
"build",
"post-build",
"pre-docs",
"docs",
"post-docs",
"test-flow",
"coverage-flow",
"post-ci-flow",
]
[tasks.fmt]
workspace = true
alias = "format"
[tasks.check-format]
workspace = true
[tasks.wc]
description = "Calculate the LoC in src. Require tokei to be installed."
category = "Development"
command = "tokei"
args = [ "." ]
[tasks.sort-ci]
description = "Assert that Cargo.toml is sorted. Requires cargo-sort to be installed."
category = "Development"
command = "cargo"
args = ["sort", "--check"]
[tasks.sort]
description = "Sort Cargo.toml. Requires cargo-sort to be installed."
category = "Development"
command = "cargo"
args = ["sort"]
[tasks.generate]
description = "Generate all clients"
dependencies = ["gen-js", "gen-rust"]
[tasks.gen]
alias = "generate"
[tasks.gen-js]
description = "Generate an JavaScript client."
script = [
'''
docker run --rm -v "$PWD:/local" \
openapitools/openapi-generator-cli:v7.4.0 generate \
--skip-validate-spec \
-i /local/openapi.json \
-g javascript \
--additional-properties prependFormOrBodyParameters=true \
--additional-properties usePromises=true \
-o /local/js
'''
]
[tasks.gen-rust]
description = "Generate a Rust client without validation."
script = [
'''
docker run --rm -v "$PWD:/local" \
openapitools/openapi-generator-cli:v7.4.0 generate \
-i /local/openapi.json \
-g rust \
-o /local/rust
'''
]