-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathMakefile
More file actions
50 lines (41 loc) · 1.69 KB
/
Makefile
File metadata and controls
50 lines (41 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
PY?=python
PELICAN?=pelican
PELICANOPTS=
BASEDIR=$(CURDIR)
INPUTDIR=$(BASEDIR)/content
OUTPUTDIR=$(BASEDIR)/output
CONFFILE=$(BASEDIR)/pelicanconf.py
PUBLISHCONF=$(BASEDIR)/publishconf.py
PELICANOPTS += -D
help:
@echo 'Makefile for a pelican Web site '
@echo ' '
@echo 'Usage: '
@echo ' make test (re)generate the web site, starts a HTTP Server on 8000'
@echo ' make clean remove the generated files '
@echo ' make github upload the web site '
@echo ' '
@echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html'
@echo ' '
test:
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(CONFFILE) $(PELICANOPTS)
cd $(OUTPUTDIR); python -m SimpleHTTPServer
clean:
[ ! -d $(OUTPUTDIR) ] || rm -rf $(OUTPUTDIR)
build:
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS)
# Commit changes in site, push, update master, commit, push
# Not used any more since we use travis' github pages
# deployment option
github:
cp -r $(OUTPUTDIR) /tmp/
git add -A .
git commit -m "New post/page" || true
git push -f origin site
git checkout master
cp -r /tmp/output/* .
git add -A .
git commit -m "New build" || true
git push -f origin master
rm -rf /tmp/output
.PHONY: html help clean regenerate serve devserver build ssh_upload rsync_upload dropbox_upload ftp_upload s3_upload cf_upload github