-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjustfile
More file actions
139 lines (107 loc) · 3.29 KB
/
justfile
File metadata and controls
139 lines (107 loc) · 3.29 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
set dotenv-load
set shell := ["bash", "-c"]
# -----------------------------------------------------------------------------
# Aliases
# -----------------------------------------------------------------------------
alias d := dev
alias b := build
alias bd := build-debug
alias cl := clean
alias l := lint
alias f := format
alias c := check
alias ca := check-all
alias fi := fix
alias t := test
alias ta := test-all
alias r := run
# -----------------------------------------------------------------------------
# Core Development & Build
# -----------------------------------------------------------------------------
# List available commands
@_default:
just --list --unsorted
# Run the server in development mode (debug build)
@dev:
cargo run --bin inkdrip-server
# Run the server in production mode (release build)
@run:
cargo run --release --bin inkdrip-server
# Run the CLI in development mode (pass extra args after --)
@cli-dev *args:
cargo run --bin inkdrip-cli -- {{ args }}
# Run the CLI in production mode (pass extra args after --)
@cli *args:
cargo run --release --bin inkdrip-cli -- {{ args }}
# Build all crates (release)
@build:
cargo build --release --workspace
# Build all crates (debug)
@build-debug:
cargo build --workspace
# Clean build artifacts
[confirm: "Remove all build artifacts? (target/)"]
@clean:
cargo clean
# -----------------------------------------------------------------------------
# Code Quality
# -----------------------------------------------------------------------------
# Format all code
@format:
cargo fmt --all
# Check formatting without writing
@format-check:
cargo fmt --all --check
# Run Clippy lints
@lint:
cargo clippy --workspace --all-targets
# Run Clippy and auto-fix
@fix:
cargo clippy --workspace --all-targets --fix --allow-dirty --allow-staged
# Type-check all crates
@check:
cargo check --workspace --all-targets
# Run all quality checks: format + check + lint
@check-all:
just format-check
just check
just lint
# -----------------------------------------------------------------------------
# Testing
# -----------------------------------------------------------------------------
# Run lib tests
@test *args:
cargo test --workspace --lib {{ args }}
# Run all tests (lib + integration + doc)
@test-all *args:
cargo test --workspace {{ args }}
# Run tests with stdout output visible
@test-verbose *args:
cargo test --workspace -- --nocapture {{ args }}
# -----------------------------------------------------------------------------
# Utilities
# -----------------------------------------------------------------------------
# Update all dependencies
@update:
cargo update --workspace
# Show dependency tree
@deps:
cargo tree --workspace
# Show outdated dependencies (requires cargo-outdated)
@outdated:
cargo outdated --workspace
# Watch and rebuild on file changes (requires cargo-watch)
@watch:
cargo watch -x "run --bin inkdrip-server"
# Watch and run tests on file changes (requires cargo-watch)
@watch-test:
cargo watch -x "test --workspace --lib"
# Generate and open documentation
@doc:
cargo doc --workspace --no-deps --open
# Start services with Docker Compose
@docker-up:
docker compose up -d
# Stop Docker Compose services
@docker-down:
docker compose down