Allow customising connection settings.
authorOleksandr Gavenko <gavenkoa@gmail.com>
Sat, 06 Feb 2016 13:06:00 +0200
changeset 61 cba303c0ad38
parent 60 387dd3541a06
child 62 83c835137c2e
Allow customising connection settings.
Makefile
--- a/Makefile	Wed Dec 23 12:29:27 2015 +0200
+++ b/Makefile	Sat Feb 06 13:06:00 2016 +0200
@@ -56,6 +56,11 @@
 ################################################################
 # Deploy targets.
 
+WWW_SRV_NAME := defun.work
+WWW_SRV_USER := user
+HG_SRV_NAME := hg.defun.work
+HG_SRV_USER := user
+
 ifneq '' '$(filter deploy%,$(MAKECMDGOALS))'
   $(shell rm -f HEADER.rst)
 endif
@@ -66,11 +71,11 @@
 # Will be accessible via: http://tips.defun.work/frame.html
 .PHONY: deploy2defun-web
 deploy2defun-web: html
-	rsync --delete -avP -e ssh tips-html/ user@vps:/srv/www/tips/
+	rsync --delete -avP -e ssh tips-html/ $(WWW_SRV_USER)@$(WWW_SRV_NAME):/srv/www/tips/
 
 .PHONY: deploy2defun-hg
 deploy2defun-hg:
-	hg push ssh://user@hg.defun.work//srv/hg/tips || [ $$? = 1 ]
+	hg push ssh://$(HG_SRV_USER)@$(HG_SRV_NAME)//srv/hg/tips || [ $$? = 1 ]
 
 # Will be accessible via: http://gavenkoa.users.sourceforge.net/tips-html/frame.html
 .PHONY: deploy2sf-web