-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathMakefile
67 lines (48 loc) · 1.18 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
.PHONY: image \
clean clean-pyc clean-build clean-js \
build_assets \
test test-tox \
bump/major bump/minor bump/patch \
start \
release
CURIOUS_HOME ?= /usr/src/curious
MANAGE = python tests/manage.py
SETUP = python setup.py
all: test-tox
build_assets:
${SETUP} build_assets
clean: clean-build clean-pyc clean-js
clean-build:
rm -rf build/
rm -rf dist/
rm -rf *.egg-info
clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
clean-js:
rm -rf curious/static/curious/lib/*
rm -rf curious/static/curious/dist/*
test:
${MANAGE} test
test-tox:
tox
bump/major bump/minor bump/patch:
bumpversion --verbose $(@F)
release: clean sdist bdist_wheel
twine upload dist/*
sdist:
${SETUP} sdist
ls -l dist
bdist_wheel:
${SETUP} bdist_wheel
ls -l dist
start: build_assets
${MANAGE} runserver ${SERVER_IP}:${SERVER_PORT}
MAKE_EXT = docker-compose run --rm curious make -C ${CURIOUS_HOME}
# Generically execute make targets from outside the Docker container
%-ext: image
${MAKE_EXT} $*
# Build the image
image:
GIT_USER_NAME=`git config user.name` GIT_USER_EMAIL=`git config user.email` docker-compose build --pull