summaryrefslogtreecommitdiff
path: root/git-hooks/pre-commit
blob: cafdb8dc3cb8325a672a14777eb54d35793cb56c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/bash -e

# Don't put anything here that routinely takes longer than a second or so to
# run. It gets old fast. That's why this uses `cargo check` and not `cargo
# test`, for example.

# Make sure the UI is up to date.
tools/build-ui
# Make sure Cargo.lock is up to date with Cargo.toml.
cargo update --locked --workspace
# Make sure there are no screamers in the code.
cargo check
# Make sure the prepared statement data in .sqlx is up to date. Requires
# `cargo-sqlx` (`cargo install cargo-sqlx`).
cargo sqlx prepare --check