-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathMakefile
54 lines (42 loc) · 963 Bytes
/
Makefile
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
# Binary name
BINARY := gomcp
# Build directory
BUILD_DIR=./bin
.PHONY: build test-coverage fmt vet deps
all: build
# Build all binaries
build:
@echo "Building $(BINARY)..."
@go build -o $(BUILD_DIR)/$(BINARY) cmd/*.go; \
# Install binaries to /usr/local/bin
install: build
@echo "Installing $(BINARY) to /usr/local/bin..."
@cp $(BUILD_DIR)/$(BINARY) /usr/local/bin/
@echo "Installation complete"
# Run tests
test:
@echo "Running tests..."
@go test -v ./...
# Run tests with coverage
test-coverage:
@echo "Running tests with coverage..."
@go test -v -cover ./...
# Format code
fmt:
@echo "Formatting code..."
@go fmt ./...
# Vet code
vet:
@echo "Vetting code..."
@go vet ./...
# staticcheck
staticcheck:
@echo "Running staticcheck..."
@staticcheck ./...
# deadcode
deadcode:
@echo "Running deadcode..."
@deadcode ./...
inspector: build
@echo "Running inspector..."
npx @modelcontextprotocol/inspector $(BUILD_DIR)/$(BINARY) --debug