-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
58 lines (48 loc) · 1.34 KB
/
Makefile
File metadata and controls
58 lines (48 loc) · 1.34 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
# Makefile for go-smart-queue
.PHONY: all build test clean install example help
# Default target
all: build
# Build the main CLI application
build:
@echo "Building go-smart-queue..."
@go build -o go-smart-queue .
# Run tests
test:
@echo "Running tests..."
@go test -v .
# Run tests with coverage
test-coverage:
@echo "Running tests with coverage..."
@go test -v -cover -coverprofile=coverage.out .
@go tool cover -html=coverage.out -o coverage.html
@echo "Coverage report generated: coverage.html"
# Clean build artifacts
clean:
@echo "Cleaning..."
@rm -f go-smart-queue
@rm -f coverage.out coverage.html
@rm -f examples/example-run
# Install dependencies
deps:
@echo "Installing dependencies..."
@go mod download
@go mod tidy
# Run the example
example:
@echo "Running example..."
@cd examples && ./run-example.sh
# Install the CLI globally
install: build
@echo "Installing go-smart-queue..."
@go install .
# Show help
help:
@echo "Available targets:"
@echo " build - Build the CLI application"
@echo " test - Run tests"
@echo " test-coverage - Run tests with coverage report"
@echo " clean - Clean build artifacts"
@echo " deps - Install dependencies"
@echo " example - Run the example program"
@echo " install - Install CLI globally"
@echo " help - Show this help message"