-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathjustfile
46 lines (40 loc) · 1.39 KB
/
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
test:
RUST_LOG=swiftide=debug RUST_BACKTRACE=1 cargo nextest run --all-features --all-targets
lint:
cargo clippy --all-features -- -D warnings
cargo fmt --all -- --check
typos
lint_fix:
cargo fmt --all
cargo fix --all-features --allow-dirty --allow-staged
typos -w
docker-build:
docker build -t kwaak .
# Mac and Linux have slightly different behaviour when it comes to git/docker/filesystems.
# This ensures a fast feedback loop on macs.
test-in-docker TEST="": docker-build
docker volume create kwaak-target-cache
docker volume create kwaak-cargo-cache
docker run --rm -it \
-v /var/run/docker.sock:/var/run/docker.sock \
-v "$(pwd)":/usr/src/myapp \
-v kwaak-target-cache:/usr/src/myapp/target \
-v kwaak-cargo-cache:/usr/local/cargo \
-w /usr/src/myapp \
-e RUST_LOG=debug \
-e RUST_BACKTRACE=1 \
kwaak \
bash -c "cargo nextest run --no-fail-fast {{TEST}}"
build-in-docker PROFILE="release": docker-build
docker volume create kwaak-target-cache
docker volume create kwaak-cargo-cache
docker run --rm -it \
-v /var/run/docker.sock:/var/run/docker.sock \
-v "$(pwd)":/usr/src/myapp \
-v kwaak-target-cache:/usr/src/myapp/target \
-v kwaak-cargo-cache:/usr/local/cargo \
-w /usr/src/myapp \
-e RUST_LOG=debug \
-e RUST_BACKTRACE=1 \
kwaak \
bash -c "cargo build --profile {{PROFILE}}"