Makefile changes

This commit is contained in:
Imbus 2024-05-11 12:50:12 +02:00
parent 8d2773047e
commit d8e2c736dd

View file

@ -1,4 +1,9 @@
GITHASH := $(shell git rev-parse --short HEAD)$(shell git diff-index --quiet HEAD || echo "-dirty")
TARNAME := xl-imbus-$(GITHASH).tar.gz
run: run:
echo $(GITHASH)
./gradlew run ./gradlew run
watch: watch:
@ -6,12 +11,27 @@ watch:
build: build:
./gradlew build ./gradlew build
#./gradlew shadowJar
clean: clean:
./gradlew clean ./gradlew clean
rm -f *.tar.gz *.tar.gz.minisig *.zip *.jpg
test: test:
./gradlew test ./gradlew test
.PHONY: run build clean $(TARNAME):
git ls-files -z | xargs -0 tar -czf $(TARNAME)
$(TARNAME).minisig: $(TARNAME)
minisign -Sm $(TARNAME)
archive: $(TARNAME)
sign: $(TARNAME).minisig
publish: $(TARNAME) $(TARNAME).minisig
scp $(TARNAME) server:/public/xl/$(TARNAME)
scp $(TARNAME).minisig server:/public/xl/$(TARNAME).minisig
.PHONY: run watch build clean test archive sign publish