forked from rhel-lightspeed/linux-mcp-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
65 lines (51 loc) · 1.71 KB
/
Makefile
File metadata and controls
65 lines (51 loc) · 1.71 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
.PHONY: help sync lint format types test ci verify fix clean docs docs-serve zipapp
# Default target
help:
@echo "🔧 CI Targets:"
@echo " make ci - Run ALL CI checks (lint + format + types + test)"
@echo " make verify - Sync dependencies + run all CI checks"
@echo " make lint - Run ruff linter"
@echo " make format - Check code formatting"
@echo " make types - Run pyright type checker"
@echo " make test - Run pytest with coverage"
@echo ""
@echo "🛠️ Development Targets:"
@echo " make sync - Install/sync all dependencies"
@echo " make fix - Auto-fix lint and format issues"
@echo " make clean - Remove build artifacts and caches"
@echo ""
@echo "📦 Build Targets:"
@echo " make zipapp - Build a zipapp using shiv"
@echo ""
@echo "📚 Documentation Targets:"
@echo " make docs - Build documentation"
@echo " make docs-serve - Serve docs locally with live reload"
sync:
uv sync --locked
lint:
uv run --locked ruff check --diff
format:
uv run --locked ruff format --diff
types:
uv run --locked pyright
test:
uv run --locked pytest
ci: lint format types test
@echo ""
@echo "✅ All CI checks passed!"
verify: sync ci
fix:
uv run --locked ruff check --fix
uv run --locked ruff format
clean:
rm -rf .pytest_cache .ruff_cache .pyright coverage dist build site
rm -rf src/*.egg-info
rm -f *.pyz
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null || true
ZIPAPP_OUTPUT ?= linux-mcp-server.pyz
zipapp:
uv run --locked shiv . -c linux-mcp-server -o $(ZIPAPP_OUTPUT) -p "/usr/bin/env python3"
docs:
uv run --locked --group docs mkdocs build
docs-serve:
uv run --locked --group docs mkdocs serve --dev-addr localhost:8010 --livereload