Create a deployall
Makefile target
Move generating nethack data out of the deploy target so that deploy can just be building what's there and pushing it. Parameterize the destination build directory as BUILD_DIR. Default to the hugo default, i.e. public.
This commit is contained in:
parent
aa14214f73
commit
855c5b719e
1 changed files with 8 additions and 4 deletions
12
Makefile
12
Makefile
|
@ -1,5 +1,7 @@
|
||||||
# Eryn Wells <eryn@erynwells.me>
|
# Eryn Wells <eryn@erynwells.me>
|
||||||
|
|
||||||
|
BUILD_DIR=public
|
||||||
|
|
||||||
CONTENT_PATH=content
|
CONTENT_PATH=content
|
||||||
|
|
||||||
DEPLOY_USER=eryn
|
DEPLOY_USER=eryn
|
||||||
|
@ -14,15 +16,17 @@ NETHACK_LOGFILE_DATA_FILE=data/nethack/logfile/$(HOSTNAME).json
|
||||||
|
|
||||||
.PHONY: site deploy clean
|
.PHONY: site deploy clean
|
||||||
|
|
||||||
site: nethack
|
site:
|
||||||
@echo "Building site"
|
@echo "Building site"
|
||||||
hugo --buildDrafts --buildFuture --enableGitInfo
|
hugo --buildDrafts --buildFuture --enableGitInfo --destination "$(BUILD_DIR)"
|
||||||
|
|
||||||
deploy: site
|
deploy: site
|
||||||
@echo "Deploying to $(DEPLOY_LOCATION)"
|
@echo "Deploying to $(DEPLOY_LOCATION)"
|
||||||
rsync -avz --no-times --no-perms --delete public/ "$(DEPLOY_LOCATION)"
|
rsync -avz --no-times --no-perms --delete "$(BUILD_DIR)/" "$(DEPLOY_LOCATION)"
|
||||||
git tag -f deploy-$(shell date +%Y-%m-%d)
|
git tag -f deploy-$(shell date +%Y-%m-%d)
|
||||||
|
|
||||||
|
deployall: nethack deploy
|
||||||
|
|
||||||
nethack: nethack-logfile nethack-commit
|
nethack: nethack-logfile nethack-commit
|
||||||
|
|
||||||
nethack-logfile: $(NETHACK_LOGFILE)
|
nethack-logfile: $(NETHACK_LOGFILE)
|
||||||
|
@ -43,4 +47,4 @@ weeknotes: $(PAGE_PATH)
|
||||||
sed -I -e "s/%%WEEK_NUMBER%%/$(WEEK_NUMBER)/" "$(PAGE_PATH)"
|
sed -I -e "s/%%WEEK_NUMBER%%/$(WEEK_NUMBER)/" "$(PAGE_PATH)"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf public/
|
rm -rf "$(BUILD_DIR)/"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue