Replace unused upload targets in Makefile with "up"

This commit is contained in:
Adam Goldsmith 2018-03-09 18:45:41 -05:00
parent 57da15992d
commit 004945eccc
1 changed files with 10 additions and 8 deletions

View File

@ -10,7 +10,9 @@ CONFFILE=$(BASEDIR)/pelicanconf.py
PUBLISHCONF=$(BASEDIR)/publishconf.py
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
ifeq ($(DEBUG), 1)
@ -31,8 +33,6 @@ help:
@echo ' make regenerate regenerate files upon modification '
@echo ' make publish generate using production settings '
@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 '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 '
@ -53,10 +53,12 @@ serve:
publish:
$(PELICAN) $(INPUTDIR) -o $(OUTPUTDIR) -s $(PUBLISHCONF) $(PELICANOPTS)
ssh_upload: publish
scp -P -r $(OUTPUTDIR)/* $(SSH_HOST):$(SSH_TARGET_DIR)
up:
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