Guard against unclean tarballs on ftp server
This commit is contained in:
parent
0dca2fd27a
commit
861919d217
1 changed files with 6 additions and 2 deletions
8
makefile
8
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
|
||||
|
|
Loading…
Reference in a new issue