-
-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathjustfile
More file actions
85 lines (61 loc) · 1.63 KB
/
Copy pathjustfile
File metadata and controls
85 lines (61 loc) · 1.63 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
set dotenv-load := false
# @ toggles quieting at the recipe-level. Without quiet, each commands is
# printed to STDERR before execution.
# _ marks a recipe as private and stops it from appearing in `just --list` or
# `just --summary`.
# Show all available recipes.
@_default:
just --list --unsorted
just _section "Examples:"
just examples/
just _section "Docs:"
just docs/
# Print the given text with an equal number of `=` characters below it.
@_section text:
printf "\n{{ text }}\n"
printf "%0.s=" $(seq 1 $(printf "%s" "{{ text }}" | wc -c))
printf "\n"
# Setup
# =====
# Install dependencies.
install:
pnpm i
cargo bin --install
just docs/install
just examples/install
pnpm prek install --hook-type pre-commit --hook-type pre-push
alias i := install
# Lint
# ====
# Run one, or all, of `prek`'s hooks on specific, or all, files.
lint hook="" *files="":
pnpm prek run {{ hook }} {{ if files == "" { "--all-files" } else { "--files" } }} {{ files }}
alias l := lint
# Development
# ===========
# Run the program in development mode.
run *args:
cargo run -- {{ args }}
alias r := run
# Run the program with debug logging.
debug *args:
env RUST_LOG=debug just run {{ args }}
alias d := debug
# Run tests.
test *args:
cargo nextest run {{ args }}
alias t := test
# Benchmark the release binary.
bench *args: release
cargo bin hyperfine --warmup 10 --shell=none './target/release/pls {{ args }}'
alias b := bench
# Release
# =======
# Build the release binary.
release:
cargo build --release
alias R := release
# Bump the version and create a release commit and tag.
bump *args:
cargo release {{ args }}
alias B := bump