mirror of
https://github.com/LemmyNet/lemmy.git
synced 2026-04-29 21:09:32 -05:00
df4a79f4b6
* move schema_setup to separate crate * remove lemmy_utils dependency * add db_schema_setup/src/main.rs * fix diesel.toml * run diesel print-schema * fix replaceable_schema paths * remove unneeded dependencies * taplo format * fix duplicated cfg(test) attribute * move replaceable_schema to crates/db_schema_setup/replaceable_schema * warn if lemmy_db_schema_setup can be used instead of lemmy_server
18 lines
438 B
Bash
Executable File
18 lines
438 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
CWD="$(cd -P -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd -P)"
|
|
|
|
cd "$CWD/../"
|
|
|
|
# Format rust files
|
|
cargo +nightly fmt
|
|
|
|
# Format toml files
|
|
taplo format
|
|
|
|
# Format sql files
|
|
find migrations crates/db_schema_setup/replaceable_schema -type f -name '*.sql' -print0 | xargs -0 -P 10 -L 10 pg_format -i
|
|
|
|
cargo clippy --workspace --fix --allow-staged --allow-dirty --tests --all-targets --all-features -- -D warnings
|