File size: 2,185 Bytes
6afa130
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
.PHONY: build test check fmt lint clean release run daemon help verify

help:
	@echo "πŸ” Human-Touch Gateway β€” Makefile Commands"
	@echo ""
	@echo "Build & Test:"
	@echo "  make build        - Build in debug mode"
	@echo "  make release      - Build optimized release binary"
	@echo "  make test         - Run all tests"
	@echo "  make check        - Run cargo check"
	@echo ""
	@echo "Development:"
	@echo "  make fmt          - Format code (cargo fmt)"
	@echo "  make lint         - Run clippy linter"
	@echo "  make verify       - Run check + fmt + lint"
	@echo ""
	@echo "Running:"
	@echo "  make run          - Run interactive mode"
	@echo "  make daemon       - Run daemon mode (webhook)"
	@echo ""
	@echo "Maintenance:"
	@echo "  make clean        - Remove build artifacts"
	@echo "  make help         - Show this message"

build:
	@echo "πŸ”¨ Building human-touch gateway..."
	cargo build --verbose

release:
	@echo "πŸš€ Building release binary..."
	cargo build --release --verbose

test:
	@echo "πŸ§ͺ Running tests..."
	cargo test --verbose -- --nocapture --test-threads=1

check:
	@echo "βœ“ Checking code..."
	cargo check --verbose

fmt:
	@echo "πŸ“ Formatting code..."
	cargo fmt --all

lint:
	@echo "πŸ” Running clippy..."
	cargo clippy --all-targets --all-features -- -D warnings

verify: check fmt lint test
	@echo "βœ… All checks passed!"

run:
	@echo "πŸƒ Running interactive mode..."
	cargo run -- --verbose --repo-path .

daemon:
	@echo "πŸŒ™ Running daemon mode..."
	cargo run -- --daemon --webhook-port 8080 --verbose --repo-path .

clean:
	@echo "🧹 Cleaning build artifacts..."
	cargo clean
	rm -rf target/
	find . -name "*.wasm" -delete

install:
	@echo "πŸ“¦ Installing binary..."
	cargo install --path .

doc:
	@echo "πŸ“š Building documentation..."
	cargo doc --no-deps --open

update:
	@echo "πŸ”„ Updating dependencies..."
	cargo update

audit:
	@echo "πŸ” Security audit..."
	cargo audit

# Development workflow
dev: fmt lint test build
	@echo "βœ… Development build complete"

# Full CI workflow
ci: verify build release
	@echo "βœ… CI pipeline complete"