-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
117 lines (97 loc) · 3.06 KB
/
Makefile
File metadata and controls
117 lines (97 loc) · 3.06 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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
# Quartermaster CLI Makefile
.PHONY: help build install clean test run qm quartermaster
# Default target
help:
@echo "Quartermaster CLI - Navigate the constellations of your codebase"
@echo ""
@echo "Available commands:"
@echo " make build - Build the CLI in release mode"
@echo " make install - Install the CLI globally"
@echo " make clean - Clean build artifacts"
@echo " make test - Run tests"
@echo " make run - Run the CLI (quartermaster)"
@echo " make qm - Run the CLI (qm alias)"
@echo " make quartermaster - Run the CLI (full name)"
@echo " make dev - Build and run in development mode"
@echo " make docs - Generate a local .quartermaster workspace for this repo"
@echo ""
@echo "Usage examples:"
@echo " quartermaster chart ./my-project"
@echo " qm analyze github.com/rust-lang/rust"
@echo " quartermaster chart . --no-open --non-interactive"
# Build the CLI in release mode
build:
@echo "🔨 Building Quartermaster CLI..."
cargo build --release
@echo "✅ Build complete! Binary available at target/release/quartermaster"
# Install the CLI globally
install: build
@echo "📦 Installing Quartermaster CLI..."
cargo install --path .
@echo "✅ Installation complete! Run 'quartermaster' or 'qm' to use."
# Clean build artifacts
clean:
@echo "🧹 Cleaning build artifacts..."
cargo clean
@echo "✅ Clean complete!"
# Run tests
test:
@echo "🧪 Running tests..."
cargo test
@echo "✅ Tests complete!"
# Run the CLI (quartermaster)
run: quartermaster
# Run the CLI (qm alias)
qm:
@echo "🚀 Running Quartermaster CLI (qm)..."
cargo run --bin qm
# Run the CLI (full name)
quartermaster:
@echo "🚀 Running Quartermaster CLI..."
cargo run --bin quartermaster
# Development build and run
dev:
@echo "🔧 Development mode - Building and running..."
cargo run --bin quartermaster
# Generate documentation for this repo
docs:
@echo "📚 Generating Quartermaster workspace for this repository..."
cargo run --bin quartermaster -- chart .. --no-open --non-interactive
@echo "✅ Workspace generated in ../.quartermaster/"
# Build both binaries
build-all:
@echo "🔨 Building both quartermaster and qm binaries..."
cargo build --release --bins
@echo "✅ Build complete! Binaries available at:"
@echo " - target/release/quartermaster"
@echo " - target/release/qm"
# Quick development commands
dev-qm:
@echo "🚀 Quick development run (qm)..."
cargo run --bin qm
dev-full:
@echo "🚀 Quick development run (quartermaster)..."
cargo run --bin quartermaster
# Check code formatting
fmt:
@echo "🎨 Checking code formatting..."
cargo fmt --check
# Format code
fmt-fix:
@echo "🎨 Formatting code..."
cargo fmt
# Run linter
clippy:
@echo "🔍 Running clippy linter..."
cargo clippy -- -D warnings
# Full CI check
ci: fmt clippy test
@echo "✅ All CI checks passed!"
# Show version
version:
@echo "📋 Quartermaster CLI version:"
cargo run --bin quartermaster -- --version
# Show help
show-help:
@echo "📋 Quartermaster CLI help:"
cargo run --bin quartermaster -- --help