forked from f0rthsp4ce/botka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathJustfile
39 lines (35 loc) · 861 Bytes
/
Justfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
default:
@just --list
# Autoformat code
fmt:
cargo fmt
nixfmt flake.nix
ruff format .
prettier $PRETTIER_PLUGINS -w \
Cargo.toml diesel.toml pyproject.toml rustfmt.toml \
README.md \
config.example.yaml \
residents-timeline/{index.ts,package.json,tsconfig.json} \
;
# Run lints and tests
check:
deadnix --fail .
statix check .
mypy .
ruff check .
cargo clippy --all-targets -- --deny warnings --cfg clippy
cargo test
# Regenerate src/schema.rs from diesel migrations
schema:
rm -f diesel.tmp.db
diesel --database-url diesel.tmp.db migration run
rm -f diesel.tmp.db
# Regenerate hashes.nix
hashes:
#!/usr/bin/env bash
set -euo pipefail
HASH=$(prefetch-npm-deps residents-timeline/package-lock.json)
{
echo '# Automatically generated by `just hashes`. Do not edit.'
echo "{ residents-timeline = \"${HASH}\"; }"
} > hashes.nix