-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
115 lines (94 loc) · 2.78 KB
/
Makefile
File metadata and controls
115 lines (94 loc) · 2.78 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
.PHONY: help build run test coverage install clean dev release setup check lint fmt bench
# Default target
help:
@echo "xvn development commands:"
@echo ""
@echo "Development:"
@echo " make dev Build and install for local development"
@echo " make run Quick compile and run"
@echo " make build Build debug binary"
@echo " make release Build optimized release binary"
@echo ""
@echo "Testing:"
@echo " make test Run all tests"
@echo " make test-watch Run tests on file changes"
@echo " make coverage Generate code coverage report"
@echo " make bench Run performance benchmarks"
@echo ""
@echo "Code Quality:"
@echo " make check Run all checks (fmt, clippy, test)"
@echo " make lint Run clippy linter"
@echo " make fmt Format code"
@echo " make fmt-check Check code formatting"
@echo ""
@echo "Installation:"
@echo " make install Install xvn to ~/.cargo/bin"
@echo " make setup Install and run setup (local development)"
@echo " make uninstall Remove xvn from ~/.cargo/bin"
@echo ""
@echo "Release:"
@echo " make version-patch Bump patch version (0.6.1 -> 0.6.2)"
@echo " make version-minor Bump minor version (0.6.1 -> 0.7.0)"
@echo " make version-major Bump major version (0.6.1 -> 1.0.0)"
@echo ""
@echo "Misc:"
@echo " make clean Clean build artifacts"
@echo " make npm-pack Create npm package tarball"
# Development
dev: install setup
@echo "✅ xvn installed and configured for development"
@echo "Run 'xvn --help' to see available commands"
run:
@cargo run --quiet -- $(ARGS)
build:
@cargo build --quiet
@echo "✅ Debug build complete: target/debug/xvn"
release:
@cargo build --release --quiet
@echo "✅ Release build complete: target/release/xvn"
# Testing
test:
@cargo test --quiet
test-watch:
@cargo watch -x test
coverage:
@./scripts/coverage.sh
bench:
@cargo bench
# Code Quality
check: fmt-check lint test
@echo "✅ All checks passed"
lint:
@cargo clippy --all-targets --all-features -- -D warnings
fmt:
@cargo fmt
fmt-check:
@cargo fmt -- --check
# Installation
install:
@cargo install --path . --quiet
@echo "✅ xvn installed to ~/.cargo/bin"
setup: install
@echo "Running xvn setup..."
@xvn setup --force
@echo ""
@echo "✅ Setup complete. Restart your shell or run:"
@echo " source ~/.bashrc # or ~/.zshrc"
uninstall:
@cargo uninstall xvn
@echo "✅ xvn uninstalled"
# Release
version-patch:
@./scripts/version.sh patch
version-minor:
@./scripts/version.sh minor
version-major:
@./scripts/version.sh major
# Misc
clean:
@cargo clean
@rm -rf native/
@echo "✅ Build artifacts cleaned"
npm-pack:
@npm pack
@echo "✅ npm package created"