-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile.toml
96 lines (84 loc) · 1.93 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
[env]
CARGO_MAKE_RUN_CODECOV = true
[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",
"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.gen]
alias = "generate"
[tasks.generate]
description = "Generate the Rust SDK from the API spec."
dependencies = [
"generate-sdk",
"sort",
"format-flow",
"clippy-flow",
]
# TODO: Consider piping in the package version from Cargo.toml
# if the generator is producing the wrong library version.
[tasks.generate-sdk]
description = "Generate the SDK. Does not fmt or sort the output. Use `cargo make generate` instead."
private = true
script = [
'''
docker run --rm -v "$PWD:/local" \
openapitools/openapi-generator-cli:v7.11.0 generate \
-i /local/openapi.json \
-g rust \
--additional-properties library=reqwest-trait \
--additional-properties mockall=true \
--additional-properties topLevelApiClient=true \
--additional-properties packageName=multitool-sdk \
--additional-properties preferUnsignedInt=true \
--additional-properties useBonBuilder=true \
-o /local/
'''
]