12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- PELICAN=./localpelican.sh
- PELICANOPTS=
- BASEDIR=$(CURDIR)
- INPUTDIR=$(BASEDIR)/content
- OUTPUTDIR=$(BASEDIR)/output
- CONFFILE=$(BASEDIR)/pelicanconf.py
- PUBLISHCONF=$(BASEDIR)/publishconf.py
- SSH_HOST=mediagoblin.org
- SSH_PORT=22
- SSH_USER=systems
- SSH_TARGET_DIR=/var/www/mediagoblin.org/pelican_build/
- SSH_GIT_DIR=/var/www/mediagoblin.org/git_checkout/
- STAGING_SSH_TARGET_DIR=/var/www/staging.mediagoblin.org/pelican_build/
- STAGING_SSH_GIT_DIR=/var/www/staging.mediagoblin.org/git_checkout/
- compile_and_run: html serve
- help:
- @echo 'Makefile for a pelican Web site '
- @echo ' '
- @echo 'Usage: '
- @echo ' make virtualenv make a virtualenv in place '
- @echo ' make html (re)generate the web site '
- @echo ' make clean remove the generated files '
- @echo ' make regenerate regenerate files upon modification '
- @echo ' make serve serve site at http://localhost:8000'
- @echo ' make rsync_upload upload the web site via rsync+ssh '
- @echo ' make compile_and_run compiles html then runs serve '
- @echo ' '
- virtualenv:
- virtualenv .
- ./bin/easy_install -U docutils pelican PasteDeploy PasteScript typogrify
- outputdir:
- mkdir -p $(OUTPUTDIR)
- html: outputdir clean $(OUTPUTDIR)/index.html
- @echo 'Done'
- $(OUTPUTDIR)/%.html:
- $(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
- clean:
- find $(OUTPUTDIR) -mindepth 1 -delete
- regenerate: clean
- $(PELICAN) -r $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
- serve:
- ./runserver.sh
- upload:
- ssh $(SSH_USER)@$(SSH_HOST) "cd $(SSH_GIT_DIR) && git pull && git reset --hard origin/master && make html"
- rsync_upload: upload
- staging_upload:
- ssh $(SSH_USER)@$(SSH_HOST) "cd $(STAGING_SSH_GIT_DIR) && git pull && git reset --hard origin/draft && make html"
- .PHONY: html help clean regenerate serve rsync_upload upload staging_upload
|