.PHONY: help setup build test fmt clippy clean install hooks dev release check all
help:
@echo "๐ฆ Netwatch Development Commands"
@echo ""
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'
setup:
@echo "๐ง Setting up development environment..."
@cargo build
@./scripts/setup-hooks.sh
@echo "โ
Setup complete!"
build:
@echo "๐จ Building netwatch..."
@cargo build
release:
@echo "๐ Building release version..."
@cargo build --release
test:
@echo "๐งช Running tests..."
@cargo test --all
fmt:
@echo "๐ Formatting code..."
@cargo fmt --all
clippy:
@echo "๐ Running clippy..."
@cargo clippy --all-targets --all-features -- -D warnings
clean:
@echo "๐งน Cleaning build artifacts..."
@cargo clean
install:
@echo "๐ฆ Installing netwatch..."
@cargo install --path .
hooks:
@echo "๐ช Installing git hooks..."
@./scripts/setup-hooks.sh
dev: fmt clippy test
check:
@echo "โ
Running all quality checks..."
@make fmt
@make clippy
@make test
@echo "๐ All checks passed!"
all: clean build test
watch:
@echo "๐ Watching for changes..."
@cargo watch -x test
run:
@echo "๐ Running netwatch..."
@cargo run
prepare-release: check
@echo "๐ Preparing for release..."
@make check
@echo "๐ Ready for release!"