2024-05-03 08:51:16 +02:00
|
|
|
GITHASH := $(shell git rev-parse --short HEAD)
|
|
|
|
|
2024-04-21 17:43:50 +02:00
|
|
|
build:
|
|
|
|
./gradlew shadowJar
|
|
|
|
|
2024-04-20 22:04:13 +02:00
|
|
|
run:
|
|
|
|
./gradlew run
|
|
|
|
|
|
|
|
clean:
|
|
|
|
./gradlew clean
|
2024-05-04 13:58:02 +02:00
|
|
|
rm -f *.tar.gz *.tar.gz.minisig
|
|
|
|
rm -f app/krusty.db
|
2024-04-20 22:04:13 +02:00
|
|
|
|
|
|
|
test:
|
|
|
|
./gradlew test
|
|
|
|
|
2024-05-03 08:16:54 +02:00
|
|
|
dbdump:
|
|
|
|
sqlite3 app/krusty.db .dump
|
|
|
|
|
|
|
|
migrate:
|
2024-05-04 14:18:00 +02:00
|
|
|
rm -f app/krusty.db
|
2024-05-03 08:16:54 +02:00
|
|
|
sqlite3 app/krusty.db < app/Migrations/create-schema.sql
|
|
|
|
sqlite3 app/krusty.db < app/Migrations/initial-data.sql
|
|
|
|
|
2024-05-03 08:34:42 +02:00
|
|
|
release:
|
|
|
|
git ls-files -z | xargs -0 tar -czf krusty-imbus_$(GITHASH).tar.gz
|
2024-05-03 08:51:16 +02:00
|
|
|
minisign -Sm krusty-imbus_$(GITHASH).tar.gz
|
|
|
|
scp krusty-imbus_$(GITHASH).tar.gz server:/public/krusty/krusty-imbus_$(GITHASH).tar.gz
|
|
|
|
scp krusty-imbus_$(GITHASH).tar.gz.minisig server:/public/krusty/krusty-imbus_$(GITHASH).tar.gz.minisig
|
2024-05-03 08:34:42 +02:00
|
|
|
|
2024-05-05 13:28:08 +02:00
|
|
|
zip:
|
|
|
|
git archive --format=zip --output=krusty-imbus_$(GITHASH).zip HEAD
|
|
|
|
|
2024-05-04 10:52:12 +02:00
|
|
|
# Generate ERD. Requires eralchemy2 (pip install eralchemy2)
|
|
|
|
erd:
|
|
|
|
eralchemy2 -i sqlite:///app/krusty.db -o erd.jpg
|
|
|
|
|
|
|
|
.PHONY: run clean test build dbdump migrate release erd
|