forked from withcoral/coral
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
78 lines (65 loc) · 2.76 KB
/
Copy pathMakefile
File metadata and controls
78 lines (65 loc) · 2.76 KB
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
.PHONY: install ui-build rust-checks license-check lint-proto lint-sources fix-sources docs-generate docs-check
install: ui-build
cargo install --path crates/coral-cli --locked
ui-build:
npm ci --prefix ui
npm run build --prefix ui
test -s ui/dist/index.html
rust-checks:
cargo fmt --all -- --check
cargo clippy --workspace --all-targets --all-features --locked -- -D warnings
cargo nextest run --workspace --all-targets --all-features --locked --no-fail-fast
RUSTDOCFLAGS="-D warnings" cargo doc --workspace --all-features --no-deps --locked
# ----------------------------------------------------------------------------
# Dependency license scan
# ----------------------------------------------------------------------------
# Fails if any workspace dependency uses a license outside the allow-list in
# deny.toml. Requires `cargo-deny`.
#
# make license-check
license-check:
cargo deny --version >/dev/null 2>&1 || cargo install --locked cargo-deny
cargo deny check licenses
# ----------------------------------------------------------------------------
# Protobuf API linting
# ----------------------------------------------------------------------------
# Lints crates/coral-api/proto with Buf.
#
# make lint-proto # check protobuf style and API-shape rules
lint-proto:
cd crates/coral-api && buf lint
# ----------------------------------------------------------------------------
# Source manifest linting
# ----------------------------------------------------------------------------
# Lints sources/ with ryl (Rust-native yamllint port).
#
# make lint-sources # check only — run before pushing changes
# make fix-sources # apply ryl's safe auto-fixes in place
lint-sources:
ryl sources
fix-sources:
ryl --fix sources
# ----------------------------------------------------------------------------
# Source docs generation
# ----------------------------------------------------------------------------
# Regenerates the source catalog pages and Mintlify navigation from
# sources/core/*/manifest.y{a,}ml and sources/community/*/manifest.y{a,}ml
# via the xtask binary.
#
# make docs-generate # write/refresh the generated files in docs/
# make docs-check # CI freshness check: non-zero exit if stale
docs-generate:
cargo run --locked -p xtask -- generate-docs \
--sources-dir sources/core \
--index docs/reference/bundled-sources.mdx \
--community-sources-dir sources/community \
--community-index docs/reference/community-sources.mdx \
--docs-json docs/docs.json
docs-check:
cargo run --locked -p xtask -- generate-docs \
--sources-dir sources/core \
--index docs/reference/bundled-sources.mdx \
--community-sources-dir sources/community \
--community-index docs/reference/community-sources.mdx \
--docs-json docs/docs.json \
--check