-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
88 lines (76 loc) Β· 2.03 KB
/
Copy pathMakefile
File metadata and controls
88 lines (76 loc) Β· 2.03 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
.PHONY: help build server demo test lint fmt clean install docker-build docker-run
# Variables
BINARY_NAME=saltare
BUILD_DIR=./bin
CMD_DIR=./cmd/saltare
GO=go
GOFLAGS=-v
# Help
help:
@echo "Saltare Makefile Commands:"
@echo ""
@echo "Build & Run:"
@echo " make build - Build binary"
@echo " make server - Run server"
@echo " make demo - Run demo (sync/async MCP calls)"
@echo ""
@echo "Testing:"
@echo " make test - Run all tests"
@echo ""
@echo "Code Quality:"
@echo " make lint - Run linter"
@echo " make fmt - Format code"
@echo ""
@echo "Other:"
@echo " make clean - Clean build artifacts"
@echo " make install - Install binary"
@echo " make docker-build - Build Docker image"
@echo " make docker-run - Run in Docker"
# Build binary
build:
@echo "Building $(BINARY_NAME)..."
@mkdir -p $(BUILD_DIR)
$(GO) build $(GOFLAGS) -o $(BUILD_DIR)/$(BINARY_NAME) $(CMD_DIR)/main.go
@echo "β Built: $(BUILD_DIR)/$(BINARY_NAME)"
# Run server
server: build
@echo "Starting Saltare server..."
$(BUILD_DIR)/$(BINARY_NAME) server
# Run demo (requires server running in another terminal)
demo:
@echo "Running Saltare demo..."
@echo "Make sure server is running: make server"
@cd demo && ./demo.sh
# Run tests
test:
@echo "Running tests..."
$(GO) test -v -race ./...
@echo "β Tests complete"
# Run linter
lint:
@echo "Running linter..."
golangci-lint run ./...
# Format code
fmt:
@echo "Formatting code..."
$(GO) fmt ./...
@echo "β Code formatted"
# Clean build artifacts
clean:
@echo "Cleaning..."
rm -rf $(BUILD_DIR)
rm -f coverage.out coverage.html
@echo "β Cleaned"
# Install binary
install: build
@echo "Installing to $(GOPATH)/bin..."
cp $(BUILD_DIR)/$(BINARY_NAME) $(GOPATH)/bin/
@echo "β Installed"
# Docker build
docker-build:
@echo "Building Docker image..."
docker build -t saltare:latest -f deployments/docker/Dockerfile .
@echo "β Docker image built"
# Docker run
docker-run:
docker run -p 8080:8080 -p 8081:8081 saltare:latest