.PHONY: alpha build bumped check lint pc release test up update
default: check
check: pc lint test
pc:
prek run -a
lint:
cargo fmt --all
CARGO_BUILD_WARNINGS=deny cargo clippy --all-targets --allow-dirty --fix
lint-ci:
cargo fmt --all --check
CARGO_BUILD_WARNINGS=deny cargo clippy --all-targets
test:
cargo llvm-cov nextest
test-ci: test
cargo llvm-cov report --lcov --output-path lcov.info
update: up up-ci
up:
cargo update --recursive --verbose
cargo upgrade --incompatible
up-ci:
prek update
pinact run --update
up-rust:
v=$$(gh release view -R rust-lang/rust --json tagName -q '.tagName | split(".")[:2] | join(".")') && sed -i "s/^channel .*/channel = \"$$v\"/" rust-toolchain.toml
build:
cargo build
bumped:
git cliff --bumped-version
alpha: check
git tag -a $(TAG) -m "chore(release): $(TAG)"
git push origin $(TAG)
release: TAG ?= $(shell git cliff --bumped-version)
release: check
git cliff -o CHANGELOG.md --tag $(TAG)
prek run --files CHANGELOG.md || prek run --files CHANGELOG.md
git add CHANGELOG.md
git commit -m "chore(release): prepare for $(TAG)"
git push
git tag -a $(TAG) -m "chore(release): $(TAG)"
git push origin $(TAG)