.PHONY: help build test clean install release security format lint
help:
@echo "Available targets:"
@echo " build - Build the application"
@echo " test - Run tests"
@echo " clean - Clean build artifacts"
@echo " install - Install system-wide"
@echo " release - Build release version"
@echo " security - Run security audit"
@echo " format - Format code"
@echo " lint - Run clippy"
@echo " check-all - Run format, lint, security, and tests"
build:
cargo build
release:
cargo build --release
test:
cargo test --all-features
test-coverage:
cargo install cargo-tarpaulin
cargo tarpaulin --out Html
clean:
cargo clean
install:
cargo install --path .
format:
cargo fmt
lint:
cargo clippy --all-features -- -D warnings
security:
cargo audit
outdated:
cargo install cargo-outdated
cargo outdated
update:
cargo update
release-create:
@read -p "Enter version (e.g., 1.0.0): " version; \
./scripts/release.sh $$version
dev-setup:
cargo install cargo-watch
cargo install cargo-audit
cargo install cargo-outdated
cargo install cargo-tarpaulin
dev-watch:
cargo watch -x check -x test -x run
check-all: format lint security test
all: clean build test release
prod: clean release
release-help:
@echo "Release Process:"
@echo "1. Update version in Cargo.toml"
@echo "2. Run: make test"
@echo "3. Run: make security"
@echo "4. Run: make release"
@echo "5. Create git tag: git tag v1.0.0"
@echo "6. Push: git push origin main --tags"
@echo "Or use: make release-create"
dev: format lint test
setup:
cargo install cargo-watch
cargo install cargo-audit
cargo install cargo-outdated
cargo install cargo-tarpaulin
cargo install cargo-edit