-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
34 lines (24 loc) · 837 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
#!/usr/bin/make
ROOT_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
VERSION := $(shell cat $(ROOT_DIR)/VERSION)
DOCKER_IMAGE := simonklb/matrix-leaf
all: build
lint:
flake8 --exclude=*.pyc $(ROOT_DIR)leaf
build: lint
docker build -t $(DOCKER_IMAGE):$(VERSION) $(ROOT_DIR)
deploy: build
docker tag $(DOCKER_IMAGE):$(VERSION) $(DOCKER_IMAGE):latest
docker push $(DOCKER_IMAGE):$(VERSION)
docker push $(DOCKER_IMAGE):latest
clean:
find ./leaf -name "__pycache__" | xargs rm -rf
find ./leaf -name "*.pyc" | xargs rm -rf
docs:
sphinx-apidoc -f -o $(ROOT_DIR)docs/source $(ROOT_DIR)leaf
cd $(ROOT_DIR)docs && make html
docs-coverage:
SPHINX_APIDOC_OPTIONS=members sphinx-apidoc -f -o \
$(ROOT_DIR)docs/source $(ROOT_DIR)leaf
cd $(ROOT_DIR)docs && make coverage
.PHONY: lint build deploy clean docs docs-coverage