patagia-control/justfile

49 lines
883 B
Makefile
Raw Normal View History

2024-10-20 19:29:28 +02:00
set shell := ["/usr/bin/env", "bash", "-euo", "pipefail", "-c"]
[private]
default:
@just --choose
2024-11-25 20:37:41 +01:00
# Run controller
run-controller $RUST_LOG="debug,h2=info,hyper_util=info,tower=info":
2024-11-25 20:37:41 +01:00
cargo run --package patagia-controller
2024-11-23 19:57:17 +01:00
2024-11-25 20:37:41 +01:00
# Run controller local development
dev-controller:
watchexec --clear --restart --stop-signal INT --debounce 300ms -- just run-controller
2024-11-23 19:57:17 +01:00
2024-10-20 19:29:28 +02:00
# Lint all source code
lint:
2024-11-23 19:57:17 +01:00
cargo clippy
2024-10-20 19:29:28 +02:00
# Format all source code
fmt:
2024-11-23 19:57:17 +01:00
nix fmt
2024-10-20 19:29:28 +02:00
# Update all dependencies
2024-11-23 19:57:17 +01:00
update: update-nix update-rust-deps
# Update rust dependencies
update-rust-deps:
cargo upgrade --recursive
cargo update --recursive
2024-10-20 19:29:28 +02:00
# Update nix flake packages
2024-11-23 19:57:17 +01:00
update-nix:
2024-10-20 19:29:28 +02:00
nix flake update
2024-11-23 19:57:17 +01:00
# Find unused dependencies with cargo machete
machete:
cargo machete
2024-12-11 21:12:24 +01:00
# Generate OpenAPI spec
open-api:
cargo xtask open-api
# Run all tests
check: check-nix
# check-nix
check-nix:
nix flake check