-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
33 lines (26 loc) · 698 Bytes
/
Makefile
File metadata and controls
33 lines (26 loc) · 698 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
.PHONY: build test coverage lint clean install
BINARY_NAME=manifold-k8s
BIN_DIR=bin
build:
@echo "Building $(BINARY_NAME)..."
@mkdir -p $(BIN_DIR)
go build -o $(BIN_DIR)/$(BINARY_NAME) .
test:
@echo "Running tests..."
go test -v -race ./...
coverage:
@echo "Running tests with coverage..."
go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
go tool cover -html=coverage.txt -o coverage.html
@echo "Coverage report generated: coverage.html"
lint:
@echo "Running linters..."
go fmt ./...
go vet ./...
clean:
@echo "Cleaning build artifacts..."
rm -rf $(BIN_DIR)
rm -f coverage.txt coverage.html
install: build
@echo "Installing $(BINARY_NAME)..."
go install .