forked from hansetag/iceberg-catalog
-
Notifications
You must be signed in to change notification settings - Fork 0
/
justfile
40 lines (30 loc) · 1.4 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
set shell := ["bash", "-c"]
set export
RUST_LOG := "debug"
check-format:
cargo fmt --all -- --check
check-clippy:
cargo clippy --all-targets --all-features --workspace -- -D warnings
check-cargo-sort:
cargo install cargo-sort
cargo sort -c -w
check: check-format check-clippy check-cargo-sort
fix:
cargo clippy --all-targets --all-features --workspace --fix --allow-staged
cargo fmt --all
cargo sort -w
doc-test:
cargo test --no-fail-fast --doc --all-features --workspace
unit-test: doc-test
cargo test --no-fail-fast --lib --all-features --workspace
test: doc-test
cargo test --no-fail-fast --all-targets --all-features --workspace
update-openapi:
# Download from https://raw.githubusercontent.com/apache/iceberg/main/open-api/rest-catalog-open-api.yaml and put into openapi folder
curl -o openapi/rest-catalog-open-api.yaml https://raw.githubusercontent.com/apache/iceberg/main/open-api/rest-catalog-open-api.yaml
# For rust-server generation only:
# Fix until https://github.com/OpenAPITools/openapi-generator/issues/7802 is resolved:
# Parse the donwloaded yaml. Then set the for the existing object components.schemas.Namespace properties.length.type to integer
# yq e '.components.schemas.Namespace.properties.length.type = "integer"' -i openapi/rest-catalog-open-api.yaml
# Replace 5XX with 500 (gnu-sed)
# gsed -i 's/5XX/500/g' openapi/rest-catalog-open-api.yaml