default:
just --list
all: build test clippy fmt-check
build:
cargo build
clippy:
cargo clippy --all-targets --all-features
fmt:
cargo fmt
fmt-check:
cargo fmt --all -- --check
publish:
#!/usr/bin/env bash
set -euxo pipefail
rm -rf tmp/release
git clone https://github.com/terror/edmv.git tmp/release
VERSION=`sed -En 's/version[[:space:]]*=[[:space:]]*"([^"]+)"/\1/p' Cargo.toml | head -1`
cd tmp/release
git tag -a $VERSION -m "Release $VERSION"
git push origin $VERSION
cargo publish
cd ../..
rm -rf tmp/release
run *args:
cargo run -- {{args}}
test:
cargo test
watch +COMMAND='test':
cargo watch --clear --exec "{{COMMAND}}"