Deploy to personal home page. Use game itself as index.html.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sun, 10 Jan 2016 16:35:44 +0200
changeset 175 9a83576eec4c
parent 174 7d7e97093f3b
child 176 c14dba10e59d
Deploy to personal home page. Use game itself as index.html.
Makefile
--- a/Makefile	Sun Jan 10 16:35:07 2016 +0200
+++ b/Makefile	Sun Jan 10 16:35:44 2016 +0200
@@ -122,9 +122,30 @@
 ifeq '' '$(SF_USER)'
   SF_USER := gavenkoa
 endif
+ifeq '' '$(DEFUN_USER)'
+  SF_USER := user
+endif
 
 .PHONY: deploy
-deploy: deploy2sf
+deploy: deploy2defun deploy2sf
+
+.PHONY: deploy2defun
+deploy2defun: deploy2defun-src deploy2defun-www
+
+.PHONY: deploy2defun-src
+deploy2defun-src:
+	hg push ssh://$(DEFUN_USER)@hg.defun.work//srv/hg/2048-js-ai/ || [ $$? = 1 ]
+
+.PHONY: deploy2defun-www
+deploy2defun-www: deploy-check $(WWW_FILES)
+	( echo 'cd /srv/www/2048'; \
+for f in $(WWW_FILES); do \
+  echo "put $$f"; \
+  echo "chmod 644 $$f"; \
+done; \
+echo "put 2048.html index.html"; \
+echo 'quit'; \
+) | sftp -b - $(DEFUN_USER)@defun.work
 
 # First time you deploy to SourceForge (sf) you need manually login to:
 #   $ sftp $(SF_USER),$(pkgname)@web.sourceforge.net
@@ -146,7 +167,7 @@
   echo "put $$f"; \
   echo "chmod 644 $$f"; \
 done; \
-echo "put README.html index.html"; \
+echo "put 2048.html index.html"; \
 echo 'quit'; \
 ) | sftp -b - $(SF_USER),$(sfpkgname)@web.sourceforge.net
 
@@ -204,7 +225,10 @@
 # Documentation targets.
 
 .PHONY: docs
-docs: rst2html
+docs: html
+
+.PHONY: html
+html: rst2html
 
 .PHONY: rst2html
 rst2html: $(RST_HTML_FILES)