-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
40 lines (32 loc) · 1.1 KB
/
Makefile
File metadata and controls
40 lines (32 loc) · 1.1 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
.PHONY: help fmt fmt-check test docs docs-venv secrets-check check
help:
@echo "LoopForge (meos) common targets:"
@echo " make fmt - cargo fmt"
@echo " make fmt-check - cargo fmt --check"
@echo " make test - cargo test (workspace, locked)"
@echo " make docs - mkdocs build --strict (uses .venv-docs if present)"
@echo " make docs-venv - create .venv-docs and install docs deps"
@echo " make secrets-check - run gitleaks (if installed)"
@echo " make check - fmt-check + test + docs"
fmt:
cargo fmt --all
fmt-check:
cargo fmt --all --check
test:
cargo test --workspace --locked
docs:
@if [ -x .venv-docs/bin/python ]; then \
.venv-docs/bin/python -m mkdocs build --strict; \
else \
python3 -m mkdocs build --strict; \
fi
docs-venv:
python3 -m venv .venv-docs
.venv-docs/bin/pip install -r requirements-docs.txt
secrets-check:
@command -v gitleaks >/dev/null 2>&1 || { \
echo "gitleaks is not installed (CI runs it automatically). Install gitleaks, then re-run: make secrets-check"; \
exit 1; \
}
gitleaks detect --source . --no-git
check: fmt-check test docs