forked from cartridge-gg/controller-cli
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
64 lines (52 loc) · 1.28 KB
/
Makefile
File metadata and controls
64 lines (52 loc) · 1.28 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
.PHONY: help install build release clean test lint fmt check
# Default target
help:
@echo "Cartridge Controller CLI - Make targets:"
@echo ""
@echo " install - Install the CLI binary to ~/.local/bin"
@echo " build - Build debug binary"
@echo " release - Build optimized release binary"
@echo " clean - Remove build artifacts"
@echo " test - Run tests"
@echo " lint - Run clippy linter"
@echo " fmt - Format code"
@echo " check - Run all checks (fmt + lint + test)"
@echo ""
# Install to ~/.local/bin
install: release
@mkdir -p ~/.local/bin
@cp target/release/controller ~/.local/bin/
@echo "✅ Installed to ~/.local/bin/controller"
@echo ""
@echo "Make sure ~/.local/bin is in your PATH:"
@echo " export PATH=\"\$$PATH:~/.local/bin\""
# Build debug binary
build:
cargo build
# Build release binary
release:
cargo build --release
# Clean build artifacts
clean:
cargo clean
# Run tests
test:
cargo test
# Run clippy
lint:
cargo clippy -- -D warnings
# Format code
fmt:
cargo fmt
# Run all checks
check: fmt lint test
@echo "✅ All checks passed"
# Run the CLI
run:
cargo run --
# Generate keypair (example)
example-keygen:
cargo run -- generate
# Check status (example)
example-status:
cargo run -- status --json