-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
62 lines (46 loc) · 1.12 KB
/
Makefile
File metadata and controls
62 lines (46 loc) · 1.12 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
CONTAINER_NAME=superlimitbreak/mediatimelinerenderer:latest
ENV=_env
PYTHON_VERSION:=3
DEPENDENCIES_PYTHON:=requirements.txt
PYTHON:=$(ENV)/bin/python$(PYTHON_VERSION)
PIP:=$(ENV)/bin/pip$(PYTHON_VERSION)
PYTEST:=$(ENV)/bin/py.test
help:
#
# install
# run
# test
# clean
.PHONY: install
install: $(ENV) upgrade_pip test
$(ENV):
virtualenv --no-site-packages -p python$(PYTHON_VERSION) $(ENV)
config.json:
cp config.dist.json config.json
.PHONY: upgrade_pip
upgrade_pip:
$(PIP) install --upgrade pip ; $(PIP) install --upgrade -r $(DEPENDENCIES_PYTHON)
.PHONY: run
run: config.json
$(PYTHON) mediaTimelineRenderer.py
.PHONY: build
build:
docker build --tag ${CONTAINER_NAME} .
.PHONY: push
push:
docker push ${CONTAINER_NAME}
.PHONY: test
$(PYTEST) .
.PHONY: cloc
cloc:
cloc --vcs=git
# Clean ------------------------------------------------------------------------
.PHONY: clean_cache
clean_cache:
find . -iname *.pyc -delete
find . -iname __pycache__ -delete
find . -iname .cache -delete
.PHONY: clean
clean: clean_cache
rm -rf $(ENV)
#rm -rf $(CONFIG)