adds publish make target
authorDaniel <thefekete@gmail.com>
Mon, 22 Jun 2020 23:53:11 +0000 (01:53 +0200)
committerDaniel <thefekete@gmail.com>
Mon, 22 Jun 2020 23:53:11 +0000 (01:53 +0200)
Makefile

index e69de29..3263c27 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -0,0 +1,9 @@
+.PHONY: publish
+publish:
+       @git diff-index --quiet HEAD -- && test -z "$(git ls-files --others)" || ( \
+               1>&2 echo "Index is dirty or there are uncommitted files!"; \
+               git status; \
+               exit 1; \
+       )
+       git archive --format=tgz HEAD \
+               | ssh root@thefekete.net "cd /var/www/thefekete.net && tar zxvf -"