]> git.cworth.org Git - lmno.games/commitdiff
Add a simple "make deploy" target
authorCarl Worth <cworth@cworth.org>
Sun, 3 May 2020 18:01:26 +0000 (11:01 -0700)
committerCarl Worth <cworth@cworth.org>
Sun, 3 May 2020 18:01:26 +0000 (11:01 -0700)
To simplify the deployment which I'd previously been doing manually.

This will deploy only the state of committed code.

empires/Makefile [new file with mode: 0644]

diff --git a/empires/Makefile b/empires/Makefile
new file mode 100644 (file)
index 0000000..f490fec
--- /dev/null
@@ -0,0 +1,11 @@
+PUBLISH_HOST=cworth.org
+PUBLISH_DIR=/srv/families.cworth.org/www
+
+DO_NOT_PUBLISH="Makefile"
+
+deploy:
+       rm -rf .deploy-source
+       git clone . .deploy-source
+       rm -rf .deploy-source/.git
+       (cd .deploy-source; rm $(DO_NOT_PUBLISH); rsync -avz ./ --delete --delete-after $(PUBLISH_HOST):$(PUBLISH_DIR) )
+       rm -rf .deploy-source