Skip to content

Commit 5dd1e6e

Browse files
committed
Merge branch 'main' into feature/auto-sdk-bumps
2 parents c81ca31 + 1540314 commit 5dd1e6e

27 files changed

+11521
-48
lines changed

.goreleaser.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ release:
118118
_Built with ❤️ by the Vapi team_
119119
120120
# Homebrew tap configuration
121-
homebrew_casks:
121+
brews:
122122
- repository:
123123
owner: VapiAI
124124
name: homebrew-tap
@@ -127,6 +127,10 @@ homebrew_casks:
127127
homepage: "https://vapi.ai"
128128
description: "Voice AI for developers - Vapi CLI"
129129
license: "MIT"
130+
test: |
131+
system "#{bin}/vapi", "--version"
132+
install: |
133+
bin.install "vapi"
130134
skip_upload: false
131135

132136
# Scoop bucket configuration (for Windows users)

Makefile

Lines changed: 94 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ GOTEST=$(GOCMD) test
88
GOGET=$(GOCMD) get
99
GOMOD=$(GOCMD) mod
1010

11+
# Node.js parameters for MCP server
12+
NPM=npm
13+
MCP_DIR=mcp-docs-server
14+
MCP_DIST=$(MCP_DIR)/dist
15+
1116
# Binary details
1217
BINARY_NAME=vapi
1318
BUILD_DIR=build
@@ -21,20 +26,56 @@ GIT_COMMIT=$(shell git rev-parse --short HEAD 2>/dev/null || echo "unknown")
2126
# Build flags - note the lowercase variable names to match main.go
2227
LDFLAGS=-ldflags "-X main.version=$(VERSION) -X main.commit=$(GIT_COMMIT) -X main.date=$(BUILD_TIME) -X main.builtBy=make"
2328

24-
# Default target
25-
all: test build
29+
# Default target - build both CLI and MCP server
30+
all: test build build-mcp
2631

2732
# Create build directory
2833
$(BUILD_DIR):
2934
@mkdir -p $(BUILD_DIR)
3035

31-
# Build the binary
36+
# Build the CLI binary
3237
build: $(BUILD_DIR)
3338
@echo "Building $(BINARY_NAME)..."
3439
$(GOBUILD) $(LDFLAGS) -o $(BINARY_PATH) -v
3540

41+
# Build MCP server
42+
build-mcp:
43+
@echo "Building MCP docs server..."
44+
@if [ ! -d "$(MCP_DIR)/node_modules" ]; then \
45+
echo "Installing MCP server dependencies..."; \
46+
cd $(MCP_DIR) && $(NPM) install; \
47+
fi
48+
@cd $(MCP_DIR) && $(NPM) run build
49+
@echo "✅ MCP server built successfully"
50+
51+
# Install MCP server dependencies
52+
mcp-deps:
53+
@echo "Installing MCP server dependencies..."
54+
@cd $(MCP_DIR) && $(NPM) install
55+
56+
# Clean MCP server
57+
clean-mcp:
58+
@echo "Cleaning MCP server..."
59+
@rm -rf $(MCP_DIR)/dist
60+
@rm -rf $(MCP_DIR)/node_modules
61+
62+
# Test MCP server
63+
test-mcp:
64+
@echo "Testing MCP server..."
65+
@cd $(MCP_DIR) && $(NPM) test
66+
67+
# Lint MCP server
68+
lint-mcp:
69+
@echo "Linting MCP server..."
70+
@cd $(MCP_DIR) && $(NPM) run lint
71+
72+
# Publish MCP server to npm
73+
publish-mcp:
74+
@echo "Publishing MCP server to npm..."
75+
@cd $(MCP_DIR) && $(NPM) publish
76+
3677
# Build for all platforms
37-
build-all: $(BUILD_DIR)
78+
build-all: $(BUILD_DIR) build-mcp
3879
@echo "Building for all platforms..."
3980
# macOS AMD64
4081
GOOS=darwin GOARCH=amd64 $(GOBUILD) $(LDFLAGS) -o $(BUILD_DIR)/$(BINARY_NAME)-darwin-amd64
@@ -50,6 +91,9 @@ test:
5091
@echo "Running tests..."
5192
$(GOTEST) -v ./...
5293

94+
# Run all tests (CLI + MCP server)
95+
test-all: test test-mcp
96+
5397
# Run tests with coverage
5498
test-coverage:
5599
@echo "Running tests with coverage..."
@@ -63,6 +107,9 @@ clean:
63107
rm -rf $(BUILD_DIR)
64108
rm -f coverage.out coverage.html
65109

110+
# Clean everything (CLI + MCP server)
111+
clean-all: clean clean-mcp
112+
66113
# Run go mod tidy
67114
tidy:
68115
@echo "Tidying modules..."
@@ -73,18 +120,33 @@ deps:
73120
@echo "Downloading dependencies..."
74121
$(GOMOD) download
75122

123+
# Install all dependencies (CLI + MCP server)
124+
deps-all: deps mcp-deps
125+
76126
# Run linters
77127
lint:
78128
@echo "Running linters..."
79129
golangci-lint run
80130

131+
# Run all linters (CLI + MCP server)
132+
lint-all: lint lint-mcp
133+
81134
# Install the binary locally
82135
install: build
83136
@echo "Installing $(BINARY_NAME)..."
84137
@mkdir -p $(HOME)/.local/bin
85138
@cp $(BINARY_PATH) $(HOME)/.local/bin/
86139
@echo "Installed to $(HOME)/.local/bin/$(BINARY_NAME)"
87140

141+
# Install MCP server globally
142+
install-mcp: build-mcp
143+
@echo "Installing MCP server globally..."
144+
@cd $(MCP_DIR) && $(NPM) install -g .
145+
@echo "✅ MCP server installed globally"
146+
147+
# Install everything
148+
install-all: install install-mcp
149+
88150
# Run the binary
89151
run: build
90152
$(BINARY_PATH)
@@ -114,22 +176,43 @@ version-bump-patch:
114176

115177
# Help target to show available commands
116178
help:
117-
@echo "Available targets:"
179+
@echo "🚀 Vapi CLI & MCP Server Build System"
180+
@echo ""
181+
@echo "📦 CLI Commands:"
118182
@echo " build Build the CLI binary"
119183
@echo " install Install the CLI to ~/.local/bin"
120-
@echo " test Run all tests"
121-
@echo " lint Run linters"
122-
@echo " clean Clean build artifacts"
184+
@echo " test Run CLI tests"
185+
@echo " lint Run CLI linters"
186+
@echo " clean Clean CLI build artifacts"
187+
@echo ""
188+
@echo "🔧 MCP Server Commands:"
189+
@echo " build-mcp Build the MCP docs server"
190+
@echo " install-mcp Install MCP server globally"
191+
@echo " test-mcp Run MCP server tests"
192+
@echo " lint-mcp Run MCP server linters"
193+
@echo " clean-mcp Clean MCP server artifacts"
194+
@echo " publish-mcp Publish MCP server to npm"
195+
@echo ""
196+
@echo "🎯 Combined Commands:"
197+
@echo " all Build both CLI and MCP server"
198+
@echo " build-all Build CLI for all platforms + MCP server"
199+
@echo " test-all Run all tests (CLI + MCP server)"
200+
@echo " lint-all Run all linters (CLI + MCP server)"
201+
@echo " clean-all Clean everything"
202+
@echo " deps-all Install all dependencies"
203+
@echo " install-all Install CLI and MCP server"
123204
@echo ""
124-
@echo "Version management:"
205+
@echo "📋 Version management:"
125206
@echo " version Show current version"
126207
@echo " version-set Set version (requires VERSION=x.y.z)"
127208
@echo " version-bump-major Bump major version (1.2.3 -> 2.0.0)"
128209
@echo " version-bump-minor Bump minor version (1.2.3 -> 1.3.0)"
129210
@echo " version-bump-patch Bump patch version (1.2.3 -> 1.2.4)"
130211
@echo ""
131212
@echo "Examples:"
213+
@echo " make all # Build everything"
214+
@echo " make install-all # Install CLI + MCP server"
132215
@echo " make version-set VERSION=1.2.3"
133-
@echo " make version-bump-patch"
216+
@echo " make publish-mcp # Publish MCP server to npm"
134217

135-
.PHONY: all build build-all test test-coverage clean tidy deps lint install run help
218+
.PHONY: all build build-mcp build-all test test-mcp test-all test-coverage clean clean-mcp clean-all tidy deps mcp-deps deps-all lint lint-mcp lint-all install install-mcp install-all run publish-mcp help

0 commit comments

Comments
 (0)