.DEFAULT_GOAL := build
t ?=
.PHONY: build
build: target/doc
cargo build
.PHONY: test
test: target
cargo test --no-fail-fast $(t) -- --nocapture
.PHONY: release
release: target test
cargo build --release
target:
cargo clean
mkdir -p ./target
sudo mount -t tmpfs none ./target
sudo chown $(whoami): ./target
target/doc: target Cargo.*
cargo doc
.PHONY: install
install: release
sudo install -m 0755 \
target/x86_64-unknown-linux-musl/release/verto /usr/local/bin
.PHONY: publish
publish: target
cargo publish
.PHONY: lint
lint:
cargo +nightly clippy -- -Wclippy::pedantic