-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
36 lines (27 loc) · 997 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
#!/bin/bash
package_name := `sed -En 's/name[[:space:]]*=[[:space:]]*"([^"]+)"/\1/p' Cargo.toml | head -1`
package_version := `sed -En 's/version[[:space:]]*=[[:space:]]*"([^"]+)"/\1/p' Cargo.toml | head -1`
run-test TEST:
cargo test --test {{TEST}}
debug TEST:
cargo test --test {{TEST}} --features debug
run-tests:
cargo test --all
bench:
cargo bench
lint:
cargo clippy
graph:
rm -f cargo-graph.dot
rm -f cargo-graph.png
cargo graph --optional-line-style dashed --optional-line-color red --optional-shape box --build-shape diamond --build-color green --build-line-color orange > cargo-graph.dot
dot -Tpng > cargo-graph.png cargo-graph.dot
clean:
cargo clean
find . -type f -name "*.orig" -exec rm {} \;
find . -type f -name "*.bk" -exec rm {} \;
find . -type f -name ".*~" -exec rm {} \;
docker:
mv docker/.dockerignore .dockerignore
docker build -t {{package_name}}_{{package_version}} -f docker/Dockerfile .
mv .dockerignore docker/.dockerignore