justfile (1400B)
1 knit := "knit" 2 cargo := "cargo" 3 4 # Show this help message 5 default: 6 @just --list 7 8 # Build every tool 9 all: 10 {{ knit }} all 11 12 # Build one or more tools 13 build +targets: 14 {{ knit }} {{ "bin/" + replace(targets, " ", " bin/") }} 15 16 # Build and run a tool 17 run target *args: 18 @{{ knit }} bin/{{ target }} && ./bin/{{ target }} {{ args }} 19 20 # Build and copy tools to ~/.local/bin 21 deploy +targets: 22 {{ knit }} {{ "deploy/" + replace(targets, " ", " deploy/") }} 23 24 # Run all test suites 25 test: 26 {{ cargo }} test --workspace 27 cd pracomer && zig build test 28 cd wrd && go test ./... 29 python3 -m unittest discover -s mpd/tests -v 30 31 # Run `cargo clippy` over the workspace 32 clippy: 33 {{ cargo }} clippy --workspace --all-targets 34 35 # Format the Rust workspace with rustfmt 36 rustfmt: 37 {{ cargo }} fmt --all 38 39 # Update `requirements.txt` lockfile from requirements.in 40 pip-update: 41 {{ knit }} .venv-stamp 42 .venv/bin/pip install --quiet pip-tools 43 .venv/bin/pip-compile --generate-hashes --strip-extras requirements.in -o requirements.txt 44 45 # Update `Cargo.lock` lockfile 46 cargo-lockfile: 47 {{ cargo }} generate-lockfile 48 49 # Remove build artifacts and caches 50 clean: 51 {{ cargo }} clean 52 for dir in pmn pracomer speediness; do rm -rf "$dir"/zig-out "$dir"/.zig-cache; done 53 for dir in hue; do rm -rf "$dir"/vendor; done 54 find bin -type f -delete 55 rm -rf .venv .knit .venv-stamp