-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
52 lines (42 loc) · 980 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
40
41
42
43
44
45
46
47
48
49
50
51
52
default:
just --list --unsorted
# Stop and remove docker container
clean:
docker stop alloxid_db
docker rm alloxid_db
# Set up docker image, create db and run migrations
init:
./scripts/init_db.sh
reset:
just clean
just init
# Run the specified crate
run crate="http":
just {{crate}}
set positional-arguments
# Run tests for the specified crate
test *crate:
#!/usr/bin/env sh
set -euxo pipefail
crate=""
# if the number of args is greater than 0
if [ $# -gt 0 ]; then
if [ $1 == "all" ]; then
crate="-p alloxid-http -p alloxid-grpc -p alloxid-front"
else
crate="-p alloxid-$1"
fi
fi
cargo nextest run $crate
# cargo-watch another just recipe
watch cmd *PARAMS:
cargo watch -s "just {{cmd}} {{PARAMS}}"
# Run the http server
http *PARAMS:
cargo run {{PARAMS}}
# Run the Dioxus frontend
front *PARAMS:
cd alloxid-front; deno task start
# Run the gRPC server
grpc *PARAMS:
cd alloxid-grpc; cargo run {{PARAMS}}