Guard against unclean tarballs on ftp server

This commit is contained in:
Imbus 2024-05-11 14:18:53 +02:00
parent 0dca2fd27a
commit 861919d217

View file

@ -1,6 +1,7 @@
GITHASH := $(shell git rev-parse --short HEAD)$(shell git diff-index --quiet HEAD || echo "-dirty")
TARNAME := xl-imbus-$(GITHASH).tar.gz
DIRNAME := xl
run:
./gradlew run
@ -31,7 +32,10 @@ tar: $(TARNAME)
sign: $(TARNAME).minisig
publish: $(TARNAME) $(TARNAME).minisig
scp $(TARNAME) server:/public/xl/$(TARNAME)
scp $(TARNAME).minisig server:/public/xl/$(TARNAME).minisig
# 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
.PHONY: run watch build clean test archive sign publish