-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
66 lines (56 loc) · 1.42 KB
/
Copy pathMakefile
File metadata and controls
66 lines (56 loc) · 1.42 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
.PHONY: build test clean install help
# Binary name
BINARY_NAME=aidm
INSTALL_PATH=/usr/local/bin
# Build the application
build:
@echo "Building AI Deployment Manager..."
go build -o bin/$(BINARY_NAME) cmd/aidm/main.go
@echo "✓ Build complete: bin/$(BINARY_NAME)"
# Run tests
test:
@echo "Running tests..."
go test -v ./...
# Clean build artifacts
clean:
@echo "Cleaning build artifacts..."
rm -rf bin/
go clean
@echo "✓ Clean complete"
# Install the binary
install: build
@echo "Installing $(BINARY_NAME) to $(INSTALL_PATH)..."
cp bin/$(BINARY_NAME) $(INSTALL_PATH)/$(BINARY_NAME)
@echo "✓ Installation complete"
# Run the application
run: build
./bin/$(BINARY_NAME)
# Format code
fmt:
@echo "Formatting code..."
go fmt ./...
# Run linter
lint:
@echo "Running linter..."
golint ./...
# Download dependencies
deps:
@echo "Downloading dependencies..."
go mod download
go mod tidy
# Help
help:
@echo "AI Deployment Manager - Makefile Commands"
@echo ""
@echo "Usage: make [command]"
@echo ""
@echo "Commands:"
@echo " build - Build the application binary"
@echo " test - Run tests"
@echo " clean - Remove build artifacts"
@echo " install - Install binary to $(INSTALL_PATH)"
@echo " run - Build and run the application"
@echo " fmt - Format code"
@echo " lint - Run linter"
@echo " deps - Download and tidy dependencies"
@echo " help - Display this help message"