Replace unused upload targets in Makefile with "up"
This commit is contained in:
parent
57da15992d
commit
004945eccc
18
Makefile
18
Makefile
@ -10,7 +10,9 @@ CONFFILE=$(BASEDIR)/pelicanconf.py
|
|||||||
PUBLISHCONF=$(BASEDIR)/publishconf.py
|
PUBLISHCONF=$(BASEDIR)/publishconf.py
|
||||||
|
|
||||||
SSH_HOST=ag
|
SSH_HOST=ag
|
||||||
SSH_TARGET_DIR=/home/adam/blag/output
|
SSH_GIT_DIR=/srv/git/blag.git
|
||||||
|
SSH_TARGET_DIR=/srv/http/blag
|
||||||
|
SSH_TMP_DIR=/tmp/blag
|
||||||
|
|
||||||
DEBUG ?= 0
|
DEBUG ?= 0
|
||||||
ifeq ($(DEBUG), 1)
|
ifeq ($(DEBUG), 1)
|
||||||
@ -31,8 +33,6 @@ help:
|
|||||||
@echo ' make regenerate regenerate files upon modification '
|
@echo ' make regenerate regenerate files upon modification '
|
||||||
@echo ' make publish generate using production settings '
|
@echo ' make publish generate using production settings '
|
||||||
@echo ' make serve [PORT=8000] serve site at http://localhost:8000'
|
@echo ' make serve [PORT=8000] serve site at http://localhost:8000'
|
||||||
@echo ' make ssh_upload upload the web site via SSH '
|
|
||||||
@echo ' make rsync_upload upload the web site via rsync+ssh '
|
|
||||||
@echo ' '
|
@echo ' '
|
||||||
@echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html '
|
@echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html '
|
||||||
@echo 'Set the RELATIVE variable to 1 to enable relative urls '
|
@echo 'Set the RELATIVE variable to 1 to enable relative urls '
|
||||||
@ -53,10 +53,12 @@ serve:
|
|||||||
publish:
|
publish:
|
||||||
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS)
|
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS)
|
||||||
|
|
||||||
ssh_upload: publish
|
up:
|
||||||
scp -P -r $(OUTPUTDIR)/* $(SSH_HOST):$(SSH_TARGET_DIR)
|
git push
|
||||||
|
ssh ag "[ ! -d $(SSH_TMP_DIR) ] && \
|
||||||
|
{git clone $(SSH_GIT_DIR) $(SSH_TMP_DIR) && cd /tmp/blag/ } || \
|
||||||
|
{cd $(SSH_TMP_DIR) && git pull}; \
|
||||||
|
make publish OUTPUTDIR=/srv/http/blag"
|
||||||
|
|
||||||
rsync_upload: publish
|
|
||||||
rsync -P -rvzc --delete $(OUTPUTDIR)/ $(SSH_HOST):$(SSH_TARGET_DIR) --cvs-exclude
|
|
||||||
|
|
||||||
.PHONY: html help clean regenerate serve serve-global devserver publish ssh_upload rsync_upload
|
.PHONY: html help clean regenerate serve publish up
|
||||||
|
Loading…
Reference in New Issue
Block a user