-
Notifications
You must be signed in to change notification settings - Fork 38
/
Makefile
32 lines (24 loc) · 867 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
.DEFAULT_GOAL := help
LOCALE=en_GB.utf8
# SERVER_DEST is defined in a `.env` file and follow this format: [email protected]:/path/to/website
include .env
.PHONY: build
build: ## Build the website with Boop! generator
env LC_ALL=$(LOCALE) boop.py --development
.PHONY: clean
clean: ## Clean site files
rm -rf ./_site ./_cache
.PHONY: open
open: build ## Open the built site in a web browser
xdg-open _site/index.html
.PHONY: publish
publish: clean ## Publish the website online (rsync)
env LC_ALL=$(LOCALE) boop.py
rsync -P -rvzc --cvs-exclude --delete ./_site/ $(SERVER_DEST)
rm -rf ./_cache
.PHONY: tree
tree: ## Display the structure of the website
tree -I '_site|_cache' --dirsfirst -CA
.PHONY: help
help:
@grep -h -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'