Improve configuration

This commit is contained in:
Tobias Reisinger 2024-04-29 04:19:02 +02:00
parent 71498256f6
commit ace4face5a
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
9 changed files with 66 additions and 51 deletions

View file

@ -1,11 +1,3 @@
ifneq (,$(wildcard ./.env))
include .env
export
endif
DATABASE_URL ?= sqlite://emgauwa-dev.sqlite
export DATABASE_URL
sqlx:
cargo sqlx database drop -y
cargo sqlx database create
@ -15,13 +7,16 @@ sqlx:
build-rpi:
cross build --target arm-unknown-linux-gnueabihf
emgauwa-%.json: config/emgauwa-%.pkl config/lib/%.pkl config/lib/common.pkl $(wildcard .env)
emgauwa-%.json: config/%.pkl config/lib/%.pkl
pkl eval -f json -o $@ $<
configs:
$(MAKE) emgauwa-core.json
$(MAKE) emgauwa-controller.json
pkl-package:
pkl project package config --output-path "./pkl-out"
clean:
rm -f emgauwa-controller.json
rm -f emgauwa-controller.sqlite