.PHONY: build release clean fmt check test doc bench help tasks clippy publish publish-dry-run build-mentisdbd
default: help
CARGO_CMD=/usr/bin/env cargo
build: fmt build-mentisdbd
${CARGO_CMD} build --release
build-mentisdbd:
${CARGO_CMD} build --bin mentisdbd --release
release: fmt check clippy build test doc
fmt:
${CARGO_CMD} fmt
check:
${CARGO_CMD} check
${CARGO_CMD} check --bin mentisdbd
clippy:
${CARGO_CMD} fmt
${CARGO_CMD} clippy --all-targets --all-features -- -D warnings
test:
${CARGO_CMD} test
bench:
${CARGO_CMD} bench 2>&1 | tee /tmp/mentisdb_bench_results.txt
doc:
${CARGO_CMD} doc --all-features
publish:
${CARGO_CMD} publish
publish-dry-run:
${CARGO_CMD} publish --dry-run
install:
${CARGO_CMD} install --path . --bin mentisdbd
clean:
${CARGO_CMD} clean
help tasks:
@echo "Available commands:"
@grep -E '^[a-zA-Z_-]+:.*##' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*## "}; {printf "\033[36m%-15s\033[0m %s\n", $$1, $$2}'