-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
100 lines (82 loc) · 2.85 KB
/
Makefile
File metadata and controls
100 lines (82 loc) · 2.85 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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
.PHONY: all clean build-mcp build-http pack-mcp pack-http test-http release-patch release-minor release-major release-dry-run
all: build-all
# Build MCP server (streamable-http)
build-mcp:
cargo build --release --bin mcp_server
# Build stdio server (stdio)
build-stdio:
cargo build --release --bin stdio_server
# Build all servers
build-all: build-mcp build-stdio
# Pack MCP server for Claude Desktop
pack: build-stdio
@echo "Packing MCP server for Claude Desktop..."
chmod +x ./target/release/stdio_server
zip -rX cluster-insights-mcp-server.mcpb -j mcpb/manifest.json ./target/release/stdio_server
# Build image
image-build:
scripts/image.sh build
# Push image
image-push:
scripts/image.sh push
# Run image
image-run:
scripts/image.sh run
# Test MCP server locally
test-mcp: build-mcp
@echo "🧪 Testing MCP server..."
@echo ""
RUST_LOG=debug BIND_ADDRESS=0.0.0.0:8001 ./target/release/mcp_server
clean:
rm -f *.mcpb *.zip
cargo clean
inspector:
npx @modelcontextprotocol/inspector
test:
@echo "Running all tests..."
cargo test --bin stdio_server -- --no-capture
# Release management with cargo-release
release-patch:
@echo "🚀 Creating patch release (x.y.Z+1)..."
cargo release patch --execute
release-minor:
@echo "🚀 Creating minor release (x.Y+1.0)..."
cargo release minor --execute
release-major:
@echo "🚀 Creating major release (X+1.0.0)..."
cargo release major --execute
release-dry-run:
@echo "🔍 Dry run - showing what would happen..."
cargo release patch --dry-run
# Manual version sync (for development)
sync-version:
@echo "🔄 Manually syncing version..."
scripts/sync-manifest-version.sh
help:
@echo "Usage:"
@echo ""
@echo "🏗️ Build Commands:"
@echo " make all - Build all servers"
@echo " make build-mcp - Build MCP server (streamable-http)"
@echo " make build-stdio - Build stdio server"
@echo " make build-all - Build all servers"
@echo " make pack - Pack MCP server for Claude Desktop"
@echo " make image-build - Build image"
@echo " make image-push - Push image"
@echo " make image-run - Run image"
@echo ""
@echo "🚀 Release Commands (uses cargo-release):"
@echo " make release-patch - Create patch release (1.0.6 → 1.0.7)"
@echo " make release-minor - Create minor release (1.0.6 → 1.1.0)"
@echo " make release-major - Create major release (1.0.6 → 2.0.0)"
@echo " make release-dry-run - Show what release-patch would do"
@echo " make sync-version - Manually sync version to manifest.json"
@echo ""
@echo "🧪 Test Commands:"
@echo " make test-mcp - Test MCP server locally"
@echo " make test - Run all tests"
@echo ""
@echo "🔧 Utility Commands:"
@echo " make clean - Clean build artifacts"
@echo " make inspector - Start Model Context Protocol Inspector"
@echo " make help - Show this help message"