32 lines
1020 B
Makefile
32 lines
1020 B
Makefile
|
|
BLOG_PATH=$(PWD)/_tmp/brokenco.de
|
|
|
|
$(BLOG_PATH):
|
|
mkdir -p _tmp
|
|
(cd _tmp && git clone --depth 1 https://github.com/rtyler/brokenco.de)
|
|
|
|
fetch-rfcs:
|
|
rsync -avz --exclude=*.json --exclude=*.xml ftp.rfc-editor.org::rfcs-text-only site/texts/rfcs/
|
|
|
|
update-blog:
|
|
(cd $(BLOG_PATH) && git pull --rebase)
|
|
|
|
$(BLOG_PATH)/vendor: $(BLOG_PATH) update-blog
|
|
(cd $(BLOG_PATH) && BUNDLE_PATH=vendor bundle install)
|
|
|
|
$(BLOG_PATH)/_site: fetch-rfcs $(BLOG_PATH)/vendor update-blog
|
|
rm -rf $(BLOG_PATH)/_site && \
|
|
(cd $(BLOG_PATH) && BUNDLE_PATH=vendor bundle exec jekyll build --config _config.yml,_config_onion.yml)
|
|
|
|
build: $(BLOG_PATH)/_site ## Not really doing anything at the moment
|
|
(cd site && date > last-generated.txt)
|
|
(cd site/blog && rsync -avz $(BLOG_PATH)/_site/gopher/ ./)
|
|
(cd site/blog && rsync -avz $(BLOG_PATH)/_posts/ ./)
|
|
|
|
deploy: build
|
|
rsync -avz --omit-dir-times --delete site/ gopher:/srv/gopher/
|
|
rsync -avz --omit-dir-times --delete $(BLOG_PATH)/_site/ gopher:/srv/www/
|
|
|
|
|
|
.PHONY: build deploy update-blog
|