-
Notifications
You must be signed in to change notification settings - Fork 47
/
Justfile
59 lines (44 loc) · 1.33 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
set positional-arguments
set dotenv-load := true
help:
@just --list --unsorted
clean:
cargo clean
build:
cargo build
alias b := build
run *args:
cargo run -- "$@"
alias r := run
release:
cargo build --release
install:
cargo install --path .
test *args:
cargo test --all-features {{args}}
alias t := test
bench *args:
cargo +nightly bench {{args}}
lint:
cargo +nightly fmt --all -- --check
cargo +nightly clippy --all-features --all-targets -- -D warnings --allow deprecated
fix:
cargo +nightly fix --allow-dirty --allow-staged
cargo +nightly clippy --all-features --all-targets --fix --allow-dirty --allow-staged -- -D warnings --allow deprecated
cargo +nightly fmt --all
alias f := fix
# Bump version. level=major,minor,patch
version level:
git diff-index --exit-code HEAD > /dev/null || ! echo You have untracked changes. Commit your changes before bumping the version.
cargo set-version --bump {{level}}
cargo update # This bumps Cargo.lock
VERSION=$(toml get tiktoken-rs/Cargo.toml package.version) && \
git commit -am "Bump version {{level}} to $VERSION" && \
git push origin HEAD
git push
release-patch: lint build test
just version patch
release-minor: lint build test
just version minor
release-major: lint build test
just version major