Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
74 lines (60 loc) · 1.79 KB
/
Copy pathMakefile
File metadata and controls
74 lines (60 loc) · 1.79 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
-include .env
export
# Internal-only targets. The file exists only in the internal repo.
-include Makefile.internal
BINARY := fusion-mcp-server
BUILD_VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "development")
.PHONY: help
help:
@echo "Available targets:"
@echo " help - Show this help message"
@echo " all - Run fmt, build, test, and install"
@echo " build - Build the fusion-mcp-server binary"
@echo " test - Run Go unit tests"
@echo " dist - Build cross-platform distribution binaries into ./dist"
@echo " fmt - Format Go source files"
@echo " install - Install the MCP server via install.sh"
@echo " debug - Build a debug binary and launch MCP inspector"
@echo " clean - Remove build artifacts and clean Go cache"
@echo ""
@echo "Examples:"
@echo " make build"
@echo " make dist"
.PHONY: all
all: lint fmt build test test-race install
@echo "✅ All done!"
.PHONY: build
build:
go build -ldflags="-s -w -X fusion-mcp/internal/version.Version=$(BUILD_VERSION)" -o $(BINARY) main.go
@echo "✅ Build successful"
.PHONY: test
test:
go test ./...
@echo "✅ Tests passed"
.PHONY: test-race
test-race:
go test ./... -race
@echo "✅ Tests passed"
.PHONY: dist
dist:
@./build-all.sh
@echo "✅ Distribution artifacts built in ./dist"
.PHONY: fmt
fmt:
golangci-lint fmt
@echo "✅ Formatting done"
.PHONY: install
install:
./install.sh
.PHONY: debug
debug:
go build -gcflags="all=-N -l" -o $(BINARY) main.go
npx @modelcontextprotocol/inspector || echo "Is inspector installed? try: npm install -g @modelcontextprotocol/inspector"
.PHONY: clean
clean:
go clean
rm -f fusion-mcp-server
@echo "✅ Cleaned up"
.PHONY: lint
lint:
golangci-lint run