.DEFAULT_GOAL := build

t ?=

.PHONY: build
build: target/doc
	cargo build

.PHONY: test
test:
	cargo test --no-fail-fast $(t) -- --nocapture

.PHONY: release
release: test
	cargo build --release

target/doc: Cargo.lock Cargo.toml
	cargo doc

.PHONY: install
install: test
	cargo install --path .

.PHONY: install
clean:
	rm -rf \
		target \
		dist

.PHONY: publish
publish: test
	cargo test --release
	cargo publish --dry-run
	verto
	git push
	cargo publish

