-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
67 lines (54 loc) · 1.21 KB
/
Copy pathjustfile
File metadata and controls
67 lines (54 loc) · 1.21 KB
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
set shell := ["bash", "-cu"]
default:
#!/usr/bin/env bash
cmd=$(just --list --unsorted \
| tail -n +2 \
| sed 's/^[[:space:]]*//' \
| grep -Ev '^(menu|default)( |$)' \
| fzf \
--prompt="just > " \
--height=40% \
--layout=reverse \
--border \
--preview "just --show {1}" \
--preview-window=right:60% \
| cut -d' ' -f1)
[ -n "$cmd" ] && just "$cmd"
# Start services (build if needed)
up:
docker compose up --build -d
# Stop services
down:
docker compose down
# Watch for file changes
watch:
docker compose up --build --watch
# Restart containers (keeps cache)
rebuild:
just down
just up
# Reset volumes + remove local images
reset:
docker compose down -v --rmi local
docker compose up --build -d
# Follow logs
logs:
docker compose logs -f
# Run tests
test *args="":
cargo test {{args}}
# Format code
fmt:
cargo fmt
# Run linter
lint:
cargo clippy --all-targets --all-features -- -D warnings
# Format and lint
check: fmt lint
# Auto-fix clippy warnings and format
fix:
cargo clippy --fix --allow-dirty
cargo fmt
# Build project
build:
cargo build