SHELL := /bin/bash
.DEFAULT_GOAL := help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
setup:
git cliff --version || cargo install git-cliff
cargo-set-version --help || cargo install cargo-edit
cargo watch --version || cargo install cargo-watch
cargo outdated --version || cargo install --locked cargo-outdated
cargo tarpaulin --version || cargo install --locked cargo-tarpaulin
cargo udeps --version || cargo install --locked cargo-udeps
dprint --version || cargo install dprint
dev:
cargo watch -x clippy
fmt:
cargo fmt --all
dprint fmt --config configs/dprint.json
fmt_check:
cargo fmt --all -- --check
dprint check --config configs/dprint.json
lint:
cargo clippy --all-targets --all-features
doc_check:
cargo doc --all-features --no-deps
test:
cargo test --all-targets
comply: fmt lint test
check: fmt_check lint test doc_check
release: ## Create a new release. Example `make release version=v2.2.0`
bash scripts/release.sh $(version)
check_dependencies:
cargo +nightly udeps
cargo outdated --root-deps-only