2018-03-31 01:43:24 +00:00
|
|
|
#
|
|
|
|
# Makefile
|
2022-04-13 22:40:29 +00:00
|
|
|
# Maxime “pep” Buquet, 2018-02-21 00:12
|
2018-03-31 01:43:24 +00:00
|
|
|
#
|
|
|
|
|
2022-04-13 22:43:37 +00:00
|
|
|
WEBROOT ?= "/var/www/bouah.net"
|
|
|
|
|
2022-04-13 22:56:03 +00:00
|
|
|
all: update deploy
|
2022-04-13 22:42:23 +00:00
|
|
|
|
2022-04-13 22:56:03 +00:00
|
|
|
deploy: clean drafts public
|
2022-04-13 22:43:37 +00:00
|
|
|
mv drafts public/_drafts
|
|
|
|
cp -rv $(WEBROOT)/specs $(WEBROOT)/files public/
|
|
|
|
rm -rf $(WEBROOT)
|
|
|
|
mv public $(WEBROOT)
|
|
|
|
|
|
|
|
update:
|
|
|
|
git pull -r
|
|
|
|
git submodule update
|
|
|
|
|
2022-04-13 22:43:08 +00:00
|
|
|
public: clean
|
2018-07-13 15:00:23 +00:00
|
|
|
hugo --debug --destination public
|
|
|
|
|
2018-12-06 18:45:50 +00:00
|
|
|
branches:
|
|
|
|
for branch in $(shell git branch --list "post-*"); do \
|
|
|
|
git checkout $$branch; \
|
2019-02-25 17:40:33 +00:00
|
|
|
hugo --debug --baseUrl "https://bouah.net/_drafts/$$branch" \
|
2018-12-06 18:45:50 +00:00
|
|
|
--buildDrafts --buildFuture --destination drafts/$$branch; \
|
|
|
|
done
|
|
|
|
|
2018-07-13 15:00:23 +00:00
|
|
|
drafts:
|
2019-02-25 17:40:33 +00:00
|
|
|
hugo --debug --baseUrl "https://bouah.net/_drafts" \
|
2018-07-13 15:00:23 +00:00
|
|
|
--buildDrafts --buildFuture --destination drafts
|
2018-03-31 01:43:24 +00:00
|
|
|
|
2018-07-13 22:26:02 +00:00
|
|
|
serve:
|
|
|
|
hugo serve --debug --buildDrafts --buildFuture
|
|
|
|
|
2022-04-13 22:43:08 +00:00
|
|
|
clean:
|
|
|
|
rm -rf public drafts
|
|
|
|
|
2022-04-13 22:44:01 +00:00
|
|
|
.PHONY: deploy update public branches drafts serve clean
|
2018-03-31 01:43:24 +00:00
|
|
|
# vim:ft=make
|
|
|
|
#
|