just: cleanup and a run recipe

This commit is contained in:
Daniel Lundin 2024-10-22 10:00:58 +02:00
parent a8bbb068a2
commit 5109ded804
Signed by: dln
SSH key fingerprint: SHA256:dQy1Xj3UiqJYpKR5ggQ2bxgz4jCH8IF+k3AB8o0kmdI

View file

@ -1,9 +1,19 @@
set shell := ["/usr/bin/env", "bash", "-euo", "pipefail", "-c"]
export OTEL_SERVICE_NAME := "my-program"
[private]
default:
@just --choose
# Run
run $RUST_LOG="debug":
nix run
# Run local development
dev:
watchexec --clear --restart --stop-signal INT --debounce 300ms -- just run
# Run all tests
check:
nix flake check
@ -17,7 +27,7 @@ fmt:
nix fmt
# Update all dependencies
update: update-nix-pkgs update-rust-deps
update: update-nix update-rust-deps
# Update rust dependencies
update-rust-deps:
@ -25,13 +35,9 @@ update-rust-deps:
cargo update --recursive
# Update nix flake packages
update-nix-pkgs:
update-nix:
nix flake update
# Find unused dependencies with cargo machete
machete:
cargo machete
# Run local development
dev $OTEL_SERVICE_NAME="my-program" $RUST_LOG="debug":
watchexec --clear --restart --stop-signal INT --debounce 300ms -- nix run .