2024-11-23 09:00:53 +00:00
|
|
|
mod backend 'gejdr-backend/backend.just'
|
|
|
|
mod docker
|
2024-08-10 09:33:15 +00:00
|
|
|
|
2024-11-23 09:00:53 +00:00
|
|
|
default: lint
|
2024-08-10 09:33:15 +00:00
|
|
|
|
|
|
|
format:
|
|
|
|
cargo fmt --all
|
|
|
|
|
|
|
|
format-check:
|
|
|
|
cargo fmt --check --all
|
|
|
|
|
2024-11-23 09:00:53 +00:00
|
|
|
migrate:
|
|
|
|
sqlx migrate run --source gejdr-core/migrations
|
2024-08-10 09:33:15 +00:00
|
|
|
|
2024-11-23 09:00:53 +00:00
|
|
|
build $SQLX_OFFLINE="1":
|
|
|
|
cargo auditable build --bin gejdr-backend
|
|
|
|
cargo auditable build --bin gejdr-bot
|
2024-08-10 09:33:15 +00:00
|
|
|
|
2024-11-23 09:00:53 +00:00
|
|
|
build-release $SQLX_OFFLINE="1":
|
|
|
|
cargo auditable build --release --bin gejdr-backend
|
|
|
|
cargo auditable build --release --bin gejdr-bot
|
2024-08-10 09:33:15 +00:00
|
|
|
|
|
|
|
lint:
|
|
|
|
cargo clippy --all-targets
|
|
|
|
|
|
|
|
audit: build
|
2024-11-23 09:00:53 +00:00
|
|
|
cargo audit bin target/debug/gejdr-backend
|
|
|
|
cargo audit bin target/debug/gejdr-bot
|
2024-08-10 09:33:15 +00:00
|
|
|
|
|
|
|
audit-release: build-release
|
2024-11-23 09:00:53 +00:00
|
|
|
cargo audit bin target/release/gejdr-backend
|
|
|
|
cargo audit bin target/release/gejdr-bot
|
2024-08-10 09:33:15 +00:00
|
|
|
|
|
|
|
test:
|
2024-11-23 09:00:53 +00:00
|
|
|
cargo test --all-targets --all
|
2024-08-10 09:33:15 +00:00
|
|
|
|
|
|
|
coverage:
|
|
|
|
mkdir -p coverage
|
|
|
|
cargo tarpaulin --config .tarpaulin.local.toml
|
|
|
|
|
|
|
|
coverage-ci:
|
|
|
|
mkdir -p coverage
|
|
|
|
cargo tarpaulin --config .tarpaulin.ci.toml
|
|
|
|
|
2024-11-23 09:00:53 +00:00
|
|
|
check-all: format-check lint coverage audit
|
2024-08-10 09:33:15 +00:00
|
|
|
|
2024-11-23 09:00:53 +00:00
|
|
|
docker-backend $SQLX_OFFLINE="1":
|
|
|
|
nix build .#dockerBackend
|
2024-08-10 09:33:15 +00:00
|
|
|
|
|
|
|
## Local Variables:
|
|
|
|
## mode: makefile
|
|
|
|
## End:
|