Makefile & ignore

This commit is contained in:
Imbus 2024-05-03 08:51:16 +02:00
parent b9c8cf5b05
commit cbed41abb3
2 changed files with 7 additions and 3 deletions

1
.gitignore vendored
View file

@ -28,3 +28,4 @@ krusty.sqlite3
*.sqlite3
*.db
*.tar.gz
*.minisig

View file

@ -1,3 +1,5 @@
GITHASH := $(shell git rev-parse --short HEAD)
build:
./gradlew shadowJar
@ -17,9 +19,10 @@ migrate:
sqlite3 app/krusty.db < app/Migrations/create-schema.sql
sqlite3 app/krusty.db < app/Migrations/initial-data.sql
GITHASH := $(shell git rev-parse --short HEAD)
# Tar everything that isnt gitignored
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
.PHONY: run clean test build
.PHONY: run clean test build dbdump migrate release