-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
55 lines (43 loc) · 903 Bytes
/
Makefile
File metadata and controls
55 lines (43 loc) · 903 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
.PHONY: build clean install test run help
# Binary name
BINARY_NAME=cdmn
# Build the application
build:
@echo "Building $(BINARY_NAME)..."
@go build -o $(BINARY_NAME) .
@echo "✅ Build complete: ./$(BINARY_NAME)"
# Install dependencies
deps:
@echo "Installing dependencies..."
@go mod download
@go mod tidy
# Clean build artifacts
clean:
@echo "Cleaning..."
@rm -f $(BINARY_NAME)
@go clean
# Install to system
install: build
@echo "Installing to /usr/local/bin..."
@sudo mv $(BINARY_NAME) /usr/local/bin/
@echo "✅ Installed successfully"
# Run tests
test:
@echo "Running tests..."
@go test -v ./...
# Run the TUI
run-tui: build
@./$(BINARY_NAME) tui
# Show help
help:
@./$(BINARY_NAME) --help
# Development: build and run
dev: build
@./$(BINARY_NAME)
# Format code
fmt:
@go fmt ./...
# Lint code (requires golangci-lint)
lint:
@golangci-lint run
.DEFAULT_GOAL := build