-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (40 loc) · 945 Bytes
/
Makefile
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
.PHONY: test build clean lint
# Default target
all: test build
# Run tests
test:
@echo "Running tests..."
@go test -v ./...
# Build the binary
build:
@echo "Building..."
@go build -v ./...
# Clean build artifacts
clean:
@echo "Cleaning..."
@rm -f openraster-go
@go clean
# Run tests with coverage
cover:
@echo "Running tests with coverage..."
@go test -v -coverprofile=coverage.out ./...
@go tool cover -html=coverage.out -o coverage.html
@echo "Coverage report generated: coverage.html"
# Format code
fmt:
@echo "Formatting code..."
@go fmt ./...
# Run linter
lint:
@echo "Running linter..."
bin/golangci-lint run
# Help target
help:
@echo "Available targets:"
@echo " test - Run tests"
@echo " build - Build the binary"
@echo " clean - Clean build artifacts"
@echo " cover - Run tests with coverage"
@echo " fmt - Format code"
@echo " lint - Run linter"
@echo " help - Show this help message"