diff --git a/makefile b/makefile index 3debf1d..4780449 100644 --- a/makefile +++ b/makefile @@ -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