-
Notifications
You must be signed in to change notification settings - Fork 112
/
Makefile
148 lines (115 loc) · 6.13 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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
.PHONY: help clean
define BROWSER_PYSCRIPT
import os, webbrowser, sys
from urllib.request import pathname2url
webbrowser.open("file://" + pathname2url(os.path.abspath(sys.argv[1])))
endef
export BROWSER_PYSCRIPT
BROWSER := python -c "$$BROWSER_PYSCRIPT"
help:
@echo "clean | Remove all build, test, coverage and Python artifacts"
@echo "clean-build | Remove build artifacts"
@echo "clean-pyc | Remove Python file artifacts"
@echo "clean-test | Remove test and coverage artifacts"
@echo "run | Run the project in Docker"
clean: clean-build clean-pyc clean-test
clean-build:
rm -rf build/
rm -rf dist/
rm -rf **/*.egg-info
rm -rf static/CACHE
clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
find . -name '*~' -exec rm -f {} +
find . -name '__pycache__' -exec rm -fr {} +
clean-test:
rm -rf .pytest_cache; \
rm -rf .ipython/profile_default; \
rm -rf htmlcov; \
rm -rf build; \
rm -f .coverage; \
rm -f coverage.xml; \
rm -f junit.xml; \
rm -rf .hypothesis; \
find . -name '*.py,cover' -exec rm -f {} +
fix-file-permissions:
sudo chown $$USER:$$USER src/fobi/migrations/ -R || true
sudo chown $$USER:$$USER src/fobi/contrib/apps/djangocms_integration/migrations/ -R || true
sudo chown $$USER:$$USER src/fobi/contrib/apps/wagtail_integration/migrations/ -R || true
sudo chown $$USER:$$USER src/fobi/contrib/form_handlers/db_store/migrations/ -R || true
sudo chown $$USER:$$USER examples/simple/page/migrations/ -R || true
sudo chown $$USER:$$USER tmp/ -R || true
run: prepare-required-files
docker-compose -f docker-compose.yml up --remove-orphans;
build: prepare-required-files
docker-compose -f docker-compose.yml build;
build-%: prepare-required-files
docker-compose -f docker-compose.yml build $*;
stop:
docker-compose -f docker-compose.yml stop;
touch:
docker-compose -f docker-compose.yml exec backend touch manage.py
make-migrations:
docker-compose -f docker-compose.yml exec backend ./manage.py makemigrations $(APP);
migrate:
docker-compose -f docker-compose.yml exec backend ./manage.py migrate $(APP);
test:
docker-compose -f docker-compose.yml exec backend pytest /backend/src/$(TEST_PATH);
tox-test:
docker-compose -f docker-compose.yml exec backend tox -e $(ARGS);
tox-list:
docker-compose -f docker-compose.yml exec backend tox -l;
show-migrations:
docker-compose -f docker-compose.yml exec backend ./manage.py showmigrations
show-urls:
docker-compose -f docker-compose.yml exec backend ./manage.py show_urls
shell:
docker-compose -f docker-compose.yml exec backend python examples/simple/manage.py shell
create-superuser:
docker-compose -f docker-compose.yml exec backend python examples/simple/manage.py createsuperuser
fobi-sync-plugins:
docker-compose -f docker-compose.yml exec backend ./manage.py fobi_sync_plugins
pip-install:
docker-compose -f docker-compose.yml exec backend pip install -r requirements/local.txt
pip-list:
docker-compose -f docker-compose.yml exec backend pip list
pip-compile:
docker-compose -f docker-compose.yml exec backend pip install --upgrade pip && pip install pip-tools
docker-compose -f docker-compose.yml exec backend ls -al /backend/examples/requirements/
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile captcha.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile common.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile debug.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile demo.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile deployment.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile dev.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile django_2_2.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile django_3_0.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile django_3_1.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile django_3_2.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile django_4_0.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile django_4_1.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile djangocms_3_4_3.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile djangorestframework.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile docs.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile feincms_1_17.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile feincms_1_20.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile latest.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile mptt.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile recaptcha.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile style_checkers.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile test.in
docker-compose -f docker-compose.yml exec -w /backend/examples/requirements/ backend pip-compile testing.in
black:
docker-compose -f docker-compose.yml exec backend black .
isort:
docker-compose -f docker-compose.yml exec backend isort . --overwrite-in-place
bash:
docker-compose -f docker-compose.yml run backend /bin/bash
prepare-required-files:
mkdir -p examples/logs examples/db examples/media examples/media/static examples/media/fobi_plugins/content_image
mkdir -p examples/media/fobi_plugins/file
release:
python setup.py register
python setup.py sdist bdist_wheel
twine upload dist/* --verbose