Improve config system

Add pkl to generate configs
This commit is contained in:
Tobias Reisinger 2024-02-18 19:50:22 +01:00
parent 8785186dfa
commit b2ff632e64
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
47 changed files with 916 additions and 277 deletions

View file

@ -1,24 +1,15 @@
build:
cargo build
sqlx-prepare:
rm -f ./emgauwa-dev.sqlite
sqlx:
cargo sqlx database drop
cargo sqlx database create
cargo sqlx migrate run
sqlx: sqlx-prepare
cargo sqlx prepare --workspace
build-rpi:
cross build --target arm-unknown-linux-gnueabihf
clean-db:
rm ./emgauwa-*.sqlite || true
$(MAKE) sqlx-prepare
_local/emgauwa-%.json: config/emgauwa-%.pkl config/lib/%.pkl config/lib/common.pkl
pkl eval -f json -o $@ $<
format:
cargo +nightly fmt
lint:
cargo clippy --all-targets --all-features -- -D warnings
configs:
$(MAKE) _local/emgauwa-core.json
$(MAKE) _local/emgauwa-controller.json