39 lines
1 KiB
Makefile
39 lines
1 KiB
Makefile
GITHASH := $(shell git rev-parse --short HEAD)
|
|
|
|
build:
|
|
./gradlew shadowJar
|
|
|
|
run:
|
|
./gradlew run
|
|
|
|
clean:
|
|
./gradlew clean
|
|
rm -f *.tar.gz *.tar.gz.minisig *.zip *.jpg
|
|
rm -f app/krusty.db
|
|
|
|
test:
|
|
./gradlew test
|
|
|
|
dbdump:
|
|
sqlite3 app/krusty.db .dump
|
|
|
|
migrate:
|
|
rm -f app/krusty.db
|
|
sqlite3 app/krusty.db < app/Migrations/create-schema.sql
|
|
sqlite3 app/krusty.db < app/Migrations/initial-data.sql
|
|
|
|
release:
|
|
git ls-files -z | xargs -0 tar -czf krusty-imbus_$(GITHASH).tar.gz
|
|
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
|
|
|
|
zip:
|
|
git archive --format=zip --prefix Rest11/ --output=Rest11.zip HEAD
|
|
7za a -tzip CourseProject11.zip ./app/Migrations/*.sql
|
|
|
|
# Generate ERD. Requires eralchemy2 (pip install eralchemy2)
|
|
erd: migrate
|
|
eralchemy2 -i sqlite:///app/krusty.db -o erd.jpg
|
|
|
|
.PHONY: run clean test build dbdump migrate release erd
|