generated from Patagia/template-nix
parent
7b273c7245
commit
af28c60984
14 changed files with 1596 additions and 66 deletions
31
justfile
31
justfile
|
@ -1,28 +1,43 @@
|
|||
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
|
||||
test:
|
||||
check:
|
||||
nix flake check
|
||||
|
||||
# Lint all source code
|
||||
lint:
|
||||
echo FIXME: Add linter(s) here
|
||||
cargo clippy
|
||||
|
||||
# Format all source code
|
||||
fmt:
|
||||
echo FIXME: Add formatter here
|
||||
nix fmt
|
||||
|
||||
# Update all dependencies
|
||||
update: update-nix-pkgs
|
||||
update: update-nix update-rust-deps
|
||||
|
||||
# Update rust dependencies
|
||||
update-rust-deps:
|
||||
cargo upgrade --recursive
|
||||
cargo update --recursive
|
||||
|
||||
# Update nix flake packages
|
||||
update-nix-pkgs:
|
||||
update-nix:
|
||||
nix flake update
|
||||
|
||||
# Run local development
|
||||
dev $OTEL_SERVICE_NAME="my-project":
|
||||
watchexec --clear --restart --stop-signal INT --debounce 300ms -- nix run .
|
||||
# Find unused dependencies with cargo machete
|
||||
machete:
|
||||
cargo machete
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue