-
Notifications
You must be signed in to change notification settings - Fork 42
/
Makefile
48 lines (36 loc) · 1018 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# -- General
SHELL := /bin/bash
POETRY = poetry
POETRY_RUN = $(POETRY) run
# ==============================================================================
# RULES
default: help
bootstrap: ## boostrap the project to start hacking
bootstrap: install
.PHONY: bootstrap
build: ## build python package
$(POETRY) build
.PHONY: build
build-docker: ## build Docker image
docker build . --target production -t md2pdf:latest
.PHONY: build-docker
install: ## install project with its dependencies
$(POETRY_RUN) install
.PHONY: install
lint: ## lint python sources
$(POETRY_RUN) ruff md2pdf
.PHONY: lint
lint-fix: ## fix lint errors
$(POETRY_RUN) ruff --fix md2pdf
.PHONY: lint-fix
publish: ## publish a new package release
publish: build
$(POETRY) publish
.PHONY: publish
test: ## run the test suite
$(POETRY_RUN) pytest
.PHONY: test
# -- Misc
help:
@grep -E '^[a-zA-Z0-9_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
.PHONY: help