-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile.toml
134 lines (112 loc) · 3.86 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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
[tasks.lint]
description = "Apply lint"
command = "cargo"
args = ["clippy", "--all-features", "--all-targets", "--", "--deny", "warnings"]
dependencies = [
"fmt-check", "sort-check",
"engine-readme-check", "clc-readme-check", "gql-readme-check",
"outdated-check",
]
[tasks.fmt-check]
description = "Check format"
command = "cargo"
args = ["fmt", "--check"]
[tasks.sort-check]
description = "Check if Cargo.toml dependencies sorted"
install_crate = { crate_name = "cargo-sort"}
command = "cargo"
args = ["sort", "--workspace", "--check"]
[tasks.outdated-check]
description = "Check to see if the dependencies are up-to-date"
install_crate = { crate_name = "cargo-outdated"}
command = "cargo"
args = [
"outdated", "--exit-code", "1",
# exclude axum because async-graphql-axum depends 0.4.x
"--ignore", "axum",
]
[tasks.cli-release-build]
env = { "CARGO_MAKE_WORKSPACE_INCLUDE_MEMBERS" = ["clc-cli"]}
run_task = { name = "release-build", fork = true}
[tasks.sort]
description = "sort Cargo.toml dependencies"
install_crate = { crate_name = "cargo-sort"}
command = "cargo"
args = ["sort", "--workspace"]
[tasks.bench]
description = "Run benchmarks"
install_crate = { crate_name = "cargo-criterion"}
command = "cargo"
args = ["criterion"]
[tasks.benchmark]
alias = "bench"
[tasks.test]
description = "Run nextest"
install_crate = { crate_name = "cargo-nextest"}
command = "cargo"
args = ["nextest", "run"]
[tasks.generate-engine-readme]
description = "Generate clc-engine README"
install_crate = { crate_name = "cargo-readme" }
script_runner = "bash"
script = [
"cargo readme --project-root clc-engine --template .project/README.tpl > clc-engine/README.md"
]
[tasks.engine-readme-check]
description = "Check clc-engine README diff"
script_runner = "bash"
script = [
"diff clc-engine/README.md <(cargo readme --project-root clc-engine --template .project/README.tpl)"
]
[tasks.generate-clc-readme]
description = "Generate clc README"
install_crate = { crate_name = "cargo-readme" }
script_runner = "bash"
script = [
"cargo readme --project-root clc-cli --template .project/README.tpl > clc-cli/README.md && cp clc-cli/README.md README.md",
]
[tasks.clc-readme-check]
description = "Check clc README diff"
script_runner = "bash"
script = [
"diff clc-cli/README.md <(cargo readme --project-root clc-cli --template .project/README.tpl)",
"diff README.md <(cargo readme --project-root clc-cli --template .project/README.tpl)"
]
[tasks.generate-gql-readme]
description = "Generate clc-gql README"
install_crate = { crate_name = "cargo-readme" }
script_runner = "bash"
script = [
"cargo readme --project-root clc-gql --template .project/README.tpl > clc-gql/README.md",
]
[tasks.gql-readme-check]
description = "Check clc-gql README diff"
script_runner = "bash"
script = [
"diff clc-gql/README.md <(cargo readme --project-root clc-gql --template .project/README.tpl)",
]
[tasks.publish-engine]
description = "Publish clc-engine package"
command = "cargo"
args = ["publish", "--package", "clc-engine"]
[tasks.install-tools]
description = "Install tools"
command = "cargo"
args = ["install", "cargo-nextest", "cargo-criterion", "cargo-sort", "cargo-readme"]
[tasks.build-clc-image]
description = "Build clc docker image"
command = "docker"
args = ["image", "build", "--file", "clc-cli/.project/container/Dockerfile", "--tag", "clc:latest", "."]
[tasks.build-gql-image]
description = "Build clc-gql docker image"
command = "docker"
args = ["image", "build", "--file", "clc-gql/.project/container/Dockerfile", "--tag", "ghcr.io/ymgyt/clc-gql:latest", "."]
[tasks.push-gql-image]
description = "Push clc-gql docker image to container registry"
command = "docker"
args = ["push", "ghcr.io/ymgyt/clc-gql:latest"]
[tasks.gql-docker-flow]
dependencies = ["build-gql-image", "push-gql-image"]
[config]
# https://github.com/sagiegurari/cargo-make#disabling-workspace-support
default_to_workspace = false