blog.bouah.net/Makefile
Maxime “pep” Buquet e121df9d77
Makefile: change default rule
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2022-04-14 00:55:13 +02:00

42 lines
854 B
Makefile

#
# Makefile
# Maxime “pep” Buquet, 2018-02-21 00:12
#
WEBROOT ?= "/var/www/bouah.net"
all: deploy
deploy: clean update drafts public
mv drafts public/_drafts
cp -rv $(WEBROOT)/specs $(WEBROOT)/files public/
rm -rf $(WEBROOT)
mv public $(WEBROOT)
update:
git pull -r
git submodule update
public: clean
hugo --debug --destination public
branches:
for branch in $(shell git branch --list "post-*"); do \
git checkout $$branch; \
hugo --debug --baseUrl "https://bouah.net/_drafts/$$branch" \
--buildDrafts --buildFuture --destination drafts/$$branch; \
done
drafts:
hugo --debug --baseUrl "https://bouah.net/_drafts" \
--buildDrafts --buildFuture --destination drafts
serve:
hugo serve --debug --buildDrafts --buildFuture
clean:
rm -rf public drafts
.PHONY: deploy update public branches drafts serve clean
# vim:ft=make
#