.DEFAULT_GOAL := help
.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}'
.PHONY: build
build:
cargo build
.PHONY: check
check:
cargo check
.PHONY: test
test:
cargo test -- --test-threads=1
.PHONY: test-integration
test-integration:
cargo test --test cli -- --test-threads=1
.PHONY: clippy
clippy:
cargo clippy -- -D warnings
.PHONY: fmt
fmt:
cargo fmt --check
.PHONY: fmt-fix
fmt-fix:
cargo fmt
.PHONY: install
install:
@echo "Installing envy..."
@cargo install --path .
.PHONY: clean
clean:
cargo clean
.PHONY: release
release:
cargo build --release
.PHONY: publish
publish: ci release
@echo "Publishing envy to crates.io..."
cargo publish
.PHONY: ci
ci: check test clippy fmt