2024-05-11 12:50:12 +02:00
|
|
|
GITHASH := $(shell git rev-parse --short HEAD)$(shell git diff-index --quiet HEAD || echo "-dirty")
|
|
|
|
|
|
|
|
TARNAME := xl-imbus-$(GITHASH).tar.gz
|
2024-05-11 14:18:53 +02:00
|
|
|
DIRNAME := xl
|
2024-05-11 12:50:12 +02:00
|
|
|
|
2024-05-11 12:39:04 +02:00
|
|
|
run:
|
|
|
|
./gradlew run
|
|
|
|
|
|
|
|
watch:
|
|
|
|
./gradlew run --continuous
|
|
|
|
|
|
|
|
build:
|
|
|
|
./gradlew build
|
2024-05-11 14:07:16 +02:00
|
|
|
ls -lh app/build/libs/*.jar
|
2024-05-11 12:39:04 +02:00
|
|
|
|
|
|
|
clean:
|
|
|
|
./gradlew clean
|
2024-05-11 12:50:12 +02:00
|
|
|
rm -f *.tar.gz *.tar.gz.minisig *.zip *.jpg
|
2024-05-11 12:39:04 +02:00
|
|
|
|
|
|
|
test:
|
|
|
|
./gradlew test
|
|
|
|
|
2024-05-11 12:50:12 +02:00
|
|
|
$(TARNAME):
|
|
|
|
git ls-files -z | xargs -0 tar -czf $(TARNAME)
|
|
|
|
|
|
|
|
$(TARNAME).minisig: $(TARNAME)
|
|
|
|
minisign -Sm $(TARNAME)
|
|
|
|
|
2024-05-11 12:55:35 +02:00
|
|
|
tar: $(TARNAME)
|
|
|
|
tar -tvf $(TARNAME)
|
2024-05-11 12:50:12 +02:00
|
|
|
|
|
|
|
sign: $(TARNAME).minisig
|
|
|
|
|
|
|
|
publish: $(TARNAME) $(TARNAME).minisig
|
2024-05-11 14:18:53 +02:00
|
|
|
# Assert git is clean
|
|
|
|
@git diff-index --quiet HEAD || (echo "git is dirty, commit changes first"; exit 1)
|
|
|
|
ssh server mkdir -p /public/$(DIRNAME)
|
|
|
|
rsync -avz $(TARNAME) server:/public/$(DIRNAME)/$(TARNAME)
|
|
|
|
rsync -avz $(TARNAME).minisig server:/public/$(DIRNAME)/$(TARNAME).minisig
|
2024-05-11 12:39:04 +02:00
|
|
|
|
2024-05-11 12:55:35 +02:00
|
|
|
.PHONY: run watch build clean test archive sign publish
|