-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjustfile
51 lines (41 loc) · 1.03 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
alias b := build
alias e := example
alias f := format
alias t := test
alias c := check
alias d := develop
alias du := docker_up
alias dd := docker_down
alias p := publish
# List commands
default:
@just --list
# Check
check:
cargo check --all
# Format and lint
format:
cargo +nightly fmt
cargo clippy --all -- -D warnings
# Test
test: docker_up && docker_down
cargo test --all -- --nocapture
# Run test suite whenever any change is made
develop: format docker_up
cargo watch -w cli -w lib -s "cargo test --all -- --nocapture"
# Build
build: format
cargo build --release
# Run an example
example EXAMPLE=("basic"): docker_up && docker_down
-cargo run --package lib_frankfurter --example {{ EXAMPLE }}
# Start up the local Frankfurter API
docker_up:
docker compose up -d --wait
# Shut down the local Frankfurter API
docker_down:
docker compose down
# Publish both the binary and library crates to crates.io
publish: test
cargo publish --package lib_frankfurter
cargo publish --package frankfurter_cli