equal
deleted
inserted
replaced
120 # Deploy targets. |
120 # Deploy targets. |
121 |
121 |
122 ifeq '' '$(SF_USER)' |
122 ifeq '' '$(SF_USER)' |
123 SF_USER := gavenkoa |
123 SF_USER := gavenkoa |
124 endif |
124 endif |
|
125 ifeq '' '$(DEFUN_USER)' |
|
126 SF_USER := user |
|
127 endif |
125 |
128 |
126 .PHONY: deploy |
129 .PHONY: deploy |
127 deploy: deploy2sf |
130 deploy: deploy2defun deploy2sf |
|
131 |
|
132 .PHONY: deploy2defun |
|
133 deploy2defun: deploy2defun-src deploy2defun-www |
|
134 |
|
135 .PHONY: deploy2defun-src |
|
136 deploy2defun-src: |
|
137 hg push ssh://$(DEFUN_USER)@hg.defun.work//srv/hg/2048-js-ai/ || [ $$? = 1 ] |
|
138 |
|
139 .PHONY: deploy2defun-www |
|
140 deploy2defun-www: deploy-check $(WWW_FILES) |
|
141 ( echo 'cd /srv/www/2048'; \ |
|
142 for f in $(WWW_FILES); do \ |
|
143 echo "put $$f"; \ |
|
144 echo "chmod 644 $$f"; \ |
|
145 done; \ |
|
146 echo "put 2048.html index.html"; \ |
|
147 echo 'quit'; \ |
|
148 ) | sftp -b - $(DEFUN_USER)@defun.work |
128 |
149 |
129 # First time you deploy to SourceForge (sf) you need manually login to: |
150 # First time you deploy to SourceForge (sf) you need manually login to: |
130 # $ sftp $(SF_USER),$(pkgname)@web.sourceforge.net |
151 # $ sftp $(SF_USER),$(pkgname)@web.sourceforge.net |
131 # as it may require interactive input for accepting server public key. |
152 # as it may require interactive input for accepting server public key. |
132 # Next time any action fully automated. |
153 # Next time any action fully automated. |
144 ( echo 'cd htdocs'; \ |
165 ( echo 'cd htdocs'; \ |
145 for f in $(WWW_FILES); do \ |
166 for f in $(WWW_FILES); do \ |
146 echo "put $$f"; \ |
167 echo "put $$f"; \ |
147 echo "chmod 644 $$f"; \ |
168 echo "chmod 644 $$f"; \ |
148 done; \ |
169 done; \ |
149 echo "put README.html index.html"; \ |
170 echo "put 2048.html index.html"; \ |
150 echo 'quit'; \ |
171 echo 'quit'; \ |
151 ) | sftp -b - $(SF_USER),$(sfpkgname)@web.sourceforge.net |
172 ) | sftp -b - $(SF_USER),$(sfpkgname)@web.sourceforge.net |
152 |
173 |
153 .PHONY: deploy2sf-release |
174 .PHONY: deploy2sf-release |
154 deploy2sf-release: deploy-check $(DIST_TARBALLS) |
175 deploy2sf-release: deploy-check $(DIST_TARBALLS) |
202 |
223 |
203 ################################################################ |
224 ################################################################ |
204 # Documentation targets. |
225 # Documentation targets. |
205 |
226 |
206 .PHONY: docs |
227 .PHONY: docs |
207 docs: rst2html |
228 docs: html |
|
229 |
|
230 .PHONY: html |
|
231 html: rst2html |
208 |
232 |
209 .PHONY: rst2html |
233 .PHONY: rst2html |
210 rst2html: $(RST_HTML_FILES) |
234 rst2html: $(RST_HTML_FILES) |
211 |
235 |
212 $(RST_HTML_FILES): $(RST_COMMON_FILES) |
236 $(RST_HTML_FILES): $(RST_COMMON_FILES) |