-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathjustfile
63 lines (42 loc) · 1.08 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
60
61
62
63
cargo := if env_var_or_default('USE_CROSS', 'false') == "true" { "cross" } else { "cargo" }
[private]
alias b := build
[private]
alias t := test
[private]
alias v := version
# Increment manifest version: major, minor, patch, rc, beta, alpha
bump +args: require_set-version
@cargo set-version --bump {{args}}
# Print current version
version:
@cargo pkgid | cut -d# -f2 | cut -d: -f2 | cut -d@ -f2
setup: require_set-version
pnpm install
# Build
build *args:
npm run build
{{cargo}} build {{args}}
# Run tests
test *args:
{{cargo}} test {{args}}
# Analyze the package and report errors, but don't build object files
check *args:
{{cargo}} check --workspace --tests --benches --examples {{args}}
# Run clippy fix
clippy:
{{cargo}} clippy --fix --all
# format the code
fmt:
{{cargo}} fmt --all
npm run lint-fix
# Check the clippy and format.
cleanliness:
cargo clippy
cargo fmt --all -- --check
# cleanup the workspace
clean:
{{cargo}} clean
[private]
@require_set-version:
cargo set-version --version >/dev/null 2>&1 || cargo install cargo-edit > /dev/null