-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathMakefile
More file actions
36 lines (26 loc) · 841 Bytes
/
Makefile
File metadata and controls
36 lines (26 loc) · 841 Bytes
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
.PHONY: build test lint vet clean serve check release install
VERSION ?= $(shell git describe --tags --always --dirty 2>/dev/null || echo "dev")
COMMIT ?= $(shell git rev-parse --short HEAD 2>/dev/null || echo "unknown")
DATE ?= $(shell date -u +%Y-%m-%dT%H:%M:%SZ)
LDFLAGS := -ldflags "-X main.Version=$(VERSION) -X main.commit=$(COMMIT) -X main.date=$(DATE)"
build:
go build $(LDFLAGS) -o bin/replicator ./cmd/replicator
test:
go test ./... -count=1
vet:
go vet ./...
lint:
golangci-lint run ./...
clean:
rm -rf bin/ dist/
# Run the MCP server (for local testing with AI agents).
serve: build
./bin/replicator serve
# Quick check: vet + test.
check: vet test
# Local release dry-run (no publish).
release:
goreleaser release --snapshot --clean
# Install to GOPATH/bin.
install:
go install $(LDFLAGS) ./cmd/replicator