fix: swap to justfile

This commit is contained in:
Elijah McMorris 2025-02-25 19:47:38 -08:00
parent 7671ab11f1
commit 40215f53e9
Signed by: NexVeridian
SSH key fingerprint: SHA256:bsA1SKZxuEcEVHAy3gY1HUeM5ykRJl0U0kQHQn0hMg8
14 changed files with 186 additions and 175 deletions

40
justfile Normal file
View file

@ -0,0 +1,40 @@
set shell := ["bash", "-c"]
set dotenv-path := "./config/dev.env"
engine := `if command -v docker >/dev/null 2>&1; then echo "docker"; else echo "podman"; fi`
check:
just precommit-shared
nix flake update
nix flake check -v
precommit:
just precommit-shared
cargo check
just test
# surrealdb, surrealdb.dev
default := "surrealdb"
up file = default:
just down {{file}}
{{engine}} compose -f docker-compose-{{file}}.yml up --build --pull always -d
down file = default:
{{engine}} compose -f docker-compose-{{file}}.yml down --volumes --remove-orphans
{{engine}} network prune -f
view:
{{engine}} attach wikidata-to-surrealdb
alias t := test
test:
cargo t --no-fail-fast
precommit-shared:
cargo upgrade -v
cargo update
cargo fmt --all
just clippy
clippy:
cargo clippy --all --fix --allow-dirty -- -W clippy::nursery -W rust-2018-idioms \
-A clippy::future_not_send -A clippy::option_if_let_else -A clippy::or_fun_call