-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (32 loc) · 966 Bytes
/
Makefile
File metadata and controls
41 lines (32 loc) · 966 Bytes
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
.PHONY: setup check test lint fmt clean build
# One-time dev environment setup
setup:
@echo "Installing apdev-rs..."
@command -v apdev-rs >/dev/null 2>&1 || cargo install apdev-rs
@echo "Installing git pre-commit hook..."
@mkdir -p .git/hooks
@cp hooks/pre-commit .git/hooks/pre-commit
@chmod +x .git/hooks/pre-commit
@echo "Done! Development environment is ready."
# Run all checks (same as pre-commit hook)
check: fmt-check lint check-chars test
check-chars:
apdev-rs check-chars src/
fmt-check:
cargo fmt --all -- --check
lint:
cargo clippy --all-targets --all-features -- -D warnings
test:
cargo test --all-features
# Build release binary and symlink to .bin/
build:
cargo build --release
@mkdir -p .bin
@ln -sf ../target/release/apcore-cli .bin/apcore-cli
@echo "Binary ready: .bin/apcore-cli"
@echo "Usage: PATH=.bin:\$$PATH apcore-cli --extensions-dir examples/extensions list"
fmt:
cargo fmt --all
clean:
cargo clean
@rm -rf .bin