-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
59 lines (40 loc) · 1.11 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#this justfile is generated
# print the just commands
default:
just --list
alias b := build
# build the software
build:
cargo build
alias r := run
# run the software
run: build
cargo run
alias t := tests
# launch all the tests
tests: build
cargo nextest run
cargo test --doc
alias p := pre-commit-all
# launch all the pre-commit hooks on all the files
pre-commit-all:
pre-commit run --all-files
alias d := docs
# build the docs
docs:
cargo doc
alias br := build-release
# build the software in release mode
build-release:
cargo build --release
alias nc := nix-checks
# launch all the checks in a flake if present and nix is available
nix-checks:
if nix --version; then nix flake check --no-pure-eval --extra-experimental-features flakes --extra-experimental-features nix-command; else echo nix is not available, so the nix checks are skipped; fi
alias a := all
# launch all the steps
all: build tests docs pre-commit-all build-release nix-checks
alias w := watch
# launch all the steps (can be very intense on cpu)
watch:
watchexec just build tests docs pre-commit-all