Automate schema updates

This commit is contained in:
Quentin Gliech
2022-11-07 11:35:06 +01:00
parent c39f011374
commit d72e702b73
7 changed files with 72 additions and 10 deletions

13
misc/update-schemas.sh Normal file
View File

@@ -0,0 +1,13 @@
#!/bin/sh
set -eu
export SQLX_OFFLINE=1
BASE_DIR="$(dirname "$0")/.."
CONFIG_SCHEMA="${BASE_DIR}/docs/config.schema.json"
GRAPHQL_SCHEMA="${BASE_DIR}/crates/graphql/schema.graphql"
set -x
# XXX: we shouldn't have to specify this feature
cargo run -p mas-config --features webpki-roots > "${CONFIG_SCHEMA}"
cargo run -p mas-graphql --features webpki-roots > "${GRAPHQL_SCHEMA}"

View File

@@ -1,9 +0,0 @@
# Disable wasmtime cache by default in the Docker image, because the rootfs is likely to be read-only
[cache]
enabled = false
# A directory which exists *must* be specified even though the cache is
# disabled, else wasmtime will try to create it, which might fail if the rootfs
# is mounted as read-only
directory = "/tmp"