-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
56 lines (43 loc) · 2.04 KB
/
Makefile
File metadata and controls
56 lines (43 loc) · 2.04 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
# Makefile
.PHONY: build release clean fmt check test doc help tasks clippy publish publish-dry-run
default: help
CARGO_CMD=/usr/bin/env cargo
# ----------------------------------------------------------------------------------------------------------------------
# Targets
# ----------------------------------------------------------------------------------------------------------------------
# Default target (ensures formatting before building)
build: fmt ## Build the workspace in release mode (runs fmt first)
${CARGO_CMD} build --workspace --release
# Full release process (ensures everything runs in the correct order)
release: fmt check clippy build test doc ## Perform a full release (fmt, check, clippy, build, test, doc)
# Format the code
fmt: ## Format the code using cargo fmt
${CARGO_CMD} fmt
# Check for errors without building
check: ## Run cargo check to analyze the code without compiling
${CARGO_CMD} check --workspace
# Strict linter, fails on warnings and suggests fixes
clippy: ## Run clippy across the workspace and fail on warnings
${CARGO_CMD} fmt
${CARGO_CMD} clippy --workspace --all-targets --all-features -- -D warnings
# Run tests
test: ## Run tests using cargo test
${CARGO_CMD} test --workspace
# Generate documentation
doc: ## Generate project documentation using cargo doc
${CARGO_CMD} doc --workspace --all-features
# Publish workspace crates to crates.io in dependency order
publish: ## Publish cloudllm_mcp then cloudllm to crates.io
${CARGO_CMD} publish -p cloudllm_mcp
${CARGO_CMD} publish -p cloudllm
# Dry-run workspace publish in dependency order
publish-dry-run: ## Dry-run publish for cloudllm_mcp then cloudllm
${CARGO_CMD} publish -p cloudllm_mcp --dry-run
${CARGO_CMD} publish -p cloudllm --dry-run
# Clean build artifacts
clean: ## Remove build artifacts using cargo clean
${CARGO_CMD} clean
# Show all available tasks
help tasks: ## Show this help message
@echo "Available commands:"
@grep -E '^[a-zA-Z_-]+:.*##' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'