forked from astriaorg/astria
-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
70 lines (54 loc) · 1.56 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
67
68
69
70
default:
@just --list
default_docker_tag := 'local'
# Builds docker image for the crate. Defaults to 'local' tag.
docker-build crate tag=default_docker_tag:
docker buildx build --load --build-arg TARGETBINARY={{crate}} -f containerfiles/Dockerfile -t {{crate}}:{{tag}} .
install-cli:
cargo install --path ./crates/astria-cli --locked
# Compiles the generated rust code from protos which are used in crates.
compile-protos:
cargo run --manifest-path tools/protobuf-compiler/Cargo.toml
## Scripts related to formatting code
default_lang := 'all'
# Can format 'rust', 'toml', 'proto', or 'all'. Defaults to all
fmt lang=default_lang:
@just _fmt-{{lang}}
# Can lint 'rust', 'toml', 'proto', 'md' or 'all'. Defaults to all.
lint lang=default_lang:
@just _lint-{{lang}}
_fmt-all:
@just _fmt-rust
@just _fmt-toml
@just _fmt-proto
@_lint-all:
-just _lint-rust
-just _lint-toml
-just _lint-proto
-just _lint-md
[no-exit-message]
_fmt-rust:
cargo +nightly-2024-02-07 fmt --all
[no-exit-message]
_lint-rust:
cargo +nightly-2024-02-07 fmt --all -- --check
cargo clippy -- --warn clippy::pedantic
cargo dylint --all
[no-exit-message]
_fmt-toml:
taplo format
[no-exit-message]
_lint-toml:
taplo format --check
[no-exit-message]
_lint-md:
markdownlint-cli2 "**/*.md" "#target" "#.github"
[no-exit-message]
_fmt-proto:
buf format -w
[no-exit-message]
_lint-proto:
buf lint
buf format -d --exit-code
buf breaking proto/executionapis --against 'buf.build/astria/execution-apis'
buf breaking proto/sequencerapis --against 'buf.build/astria/astria'