From 8a5ec56313962973ba18ee763e2ac391ba3b6d8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxime=20=E2=80=9Cpep=E2=80=9D=20Buquet?= Date: Thu, 6 Dec 2018 19:45:50 +0100 Subject: [PATCH] Add make branches to build draft branches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maxime “pep” Buquet --- Makefile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bf00a36..4361867 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,13 @@ all: rm -rf 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: hugo --debug --baseUrl "https://blog.bouah.net/_drafts" \ --buildDrafts --buildFuture --destination drafts @@ -14,6 +21,6 @@ drafts: serve: hugo serve --debug --buildDrafts --buildFuture -.PHONY: drafts +.PHONY: branches drafts # vim:ft=make #