-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
46 lines (37 loc) · 1.16 KB
/
Makefile
File metadata and controls
46 lines (37 loc) · 1.16 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
SHELL = /bin/bash
.DEFAULT_GOAL := help
makefile_dir := $(dir $(makefile_path))
VENV_DIR := $(makefile_dir).venv
# VIRTUAL ENVIRONMENT -----------------------------
.PHONY: devenv
devenv: $(VENV_DIR) ## builds development environment
# Installing python tools in $<
@$</bin/pip --no-cache install \
bump2version==1.0.1 \
pip-tools==7.4.1 \
mkdocs \
mkdocs-material \
pymdown-extensions \
mkdocstrings
# Installed packages in $<
@$</bin/pip list
$(VENV_DIR):
# creating virtual environment
@python3 -m venv $@
# updating package managers
@$@/bin/pip --no-cache install --upgrade \
pip \
setuptools \
wheel
.PHONY: serve
serve: ## serves the documentation
@$(VENV_DIR)/bin/mkdocs serve --dev-addr=0.0.0.0:8001
.PHONY: build
build: ## build the documentation site
@$(VENV_DIR)/bin/mkdocs build
.PHONY: gh-deploy
gh-deploy: ## deploy documentation to GitHub Pages
@$(VENV_DIR)/bin/mkdocs gh-deploy --force
.PHONY: help
help: ## help on rule's targets
@awk --posix 'BEGIN {FS = ":.*?## "} /^[[:alpha:][:space:]_-]+:.*?## / {printf "\033[36m%-20s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST)