-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
66 lines (55 loc) · 1.34 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
64
65
66
# List all recipes
list:
just --list --unsorted
################################################################################
# Build
# Build for production.
build:
cargo build --release
# Build for development.
build-dev:
cargo build
################################################################################
# Releases
# Build the binary for a given tag.
release tag:
git switch --detach {{ tag }}
just build
git switch -
just pull-main {{ tag }}
git switch develop
# Publish a tag to Cargo.
publish tag:
git switch --detach {{ tag }}
cargo publish
just pull-main {{ tag }}
git switch develop
# Bring main up to date
[private]
pull-main tag:
git switch main
git merge --ff-only {{ tag }}
git push
################################################################################
# Tests
# Run all tests.
test:
cargo test
# Test all binaries.
test-bins:
cargo test --bins
# Test all lib-docs.
test-docs:
cargo test --doc
# Test all library unit tests.
test-lib:
cargo test --lib
# Test all tests in tests folder.
test-units:
cargo test --tests
################################################################################
# Miscellaneous
# Switch to the latest tag.
[private]
latest:
git switch --detach $(git describe --tags $(git rev-list --tags --max-count=1))