-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
77 lines (59 loc) · 1.68 KB
/
Makefile
File metadata and controls
77 lines (59 loc) · 1.68 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
.PHONY: help
help: ## Show available targets
@awk 'BEGIN {FS=":.*##"; printf "\nUsage: make <target>\n\nTargets:\n"} /^[a-zA-Z0-9_.-]+:.*##/ {printf " %-20s %s\n", $$1, $$2}' $(MAKEFILE_LIST)
.PHONY: build
build: ## Build the raybeam binary
go build -o raybeam .
.PHONY: install
install: ## Install raybeam to GOPATH/bin
go install .
.PHONY: run
run: ## Run raybeam (requires LDAP env vars)
go run . serve
.PHONY: fmt
fmt: ## Format Go code
go fmt ./...
.PHONY: vet
vet: ## Run go vet
go vet ./...
.PHONY: lint
lint: vet ## Alias for vet (no separate linter configured)
.PHONY: test
test: ## Run all tests
go test ./... -v
.PHONY: test-race
test-race: ## Run tests with race detector
go test ./... -race
.PHONY: test-cover
test-cover: ## Run tests with coverage
go test ./... -coverprofile=coverage.out
go tool cover -html=coverage.out -o coverage.html
@echo "Coverage report: coverage.html"
.PHONY: test-short
test-short: ## Run only unit tests (skip integration)
go test ./... -short
.PHONY: typecheck
typecheck: ## Run type checking (go build with no output)
go build -o /dev/null ./...
.PHONY: check
check: fmt vet test ## Run all checks (format, vet, test)
.PHONY: clean
clean: ## Remove built binaries and test artifacts
rm -f raybeam
rm -f coverage.out coverage.html
go clean
.PHONY: mod-tidy
mod-tidy: ## Tidy go.mod and go.sum
go mod tidy
go mod verify
.PHONY: mod-update
mod-update: ## Update all dependencies
go get -u ./...
go mod tidy
.PHONY: docker-build
docker-build: ## Build Docker image
docker build -t raybeam:latest .
.PHONY: docker-run
docker-run: ## Run Docker container (requires LDAP)
docker run -it --rm -p 8080:8080 raybeam:latest
.DEFAULT_GOAL := help