blob: 3d0ae17f3a1515af7d3a3de2659a8011be2182b3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/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 doesn't run tests, for example.
tools/check-format
# Make sure package-lock.json is up to date with package.json
npm ci --dry-run
# Make sure Cargo.lock is up to date with Cargo.toml.
cargo update --locked --workspace
# Make sure there are no screamers in the code (both languages).
npm run lint
cargo check
# Make sure the prepared statement data in .sqlx is up to date. Requires
# `cargo-sqlx` (`cargo install cargo-sqlx`).
export DATABASE_URL=sqlite://pilcrow.db.pre-commit?mode=rwc
rm -f pilcrow.db.pre-commit
cargo sqlx migrate run
cargo sqlx prepare --check
|