Add make branches to build draft branches

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
This commit is contained in:
Maxime “pep” Buquet 2018-12-06 19:45:50 +01:00
parent 492e7885ab
commit 8a5ec56313
Signed by: pep
GPG key ID: DEDA74AEECA9D0F2

View file

@ -7,6 +7,13 @@ all:
rm -rf public/* rm -rf public/*
hugo --debug --destination public hugo --debug --destination public
branches:
for branch in $(shell git branch --list "post-*"); do \
git checkout $$branch; \
hugo --debug --baseUrl "https://blog.bouah.net/_drafts/$$branch" \
--buildDrafts --buildFuture --destination drafts/$$branch; \
done
drafts: drafts:
hugo --debug --baseUrl "https://blog.bouah.net/_drafts" \ hugo --debug --baseUrl "https://blog.bouah.net/_drafts" \
--buildDrafts --buildFuture --destination drafts --buildDrafts --buildFuture --destination drafts
@ -14,6 +21,6 @@ drafts:
serve: serve:
hugo serve --debug --buildDrafts --buildFuture hugo serve --debug --buildDrafts --buildFuture
.PHONY: drafts .PHONY: branches drafts
# vim:ft=make # vim:ft=make
# #