-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
66 lines (65 loc) · 2.1 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
SHELL := /bin/bash
default:
echo "No default target here. Please be more specific."
exit 1
cython-compile:
ln -s src/hypergen hypergen
mv setup.cfg xxx
python setup_cython.py build_ext --inplace || true
mv xxx setup.cfg
rm hypergen
cython-clean:
rm -rf build
find . -iname "__pycache__" -exec rm -rf '{}' \; || true
find . -iname *.pyc -delete
find . -iname "*.so" -delete
python-clean:
find . -iname "__pycache__" -exec rm -rf '{}' \; || true
find . -iname *.pyc -delete
docker-build:
docker image rm hypergen-site || true
docker build -t hypergen-site .
docker-run:
docker run --network=host -a STDOUT -a STDERR --rm --name hypergen-site hypergen-site
docker-bash:
docker exec -it hypergen-site bash
copilot-deploy:
cd examples && PROD=1 python manage.py collectstatic --noinput
copilot deploy -n hypergen-service -e prod
copilot-deploy-redis:
cd copilot && copilot svc deploy --name redis --env prod
copilot-deploy-no-static:
copilot deploy -n hypergen-service -e prod
copilot-bash:
copilot svc exec --name hypergen-service env prod -c /bin/bash
copilot-logs:
copilot svc logs -n hypergen-service -e prod --follow
copilot-logs-redis:
copilot svc logs -n redis -e prod --follow
docker-system-prune:
docker system prune -a
pytest-run:
pytest --tb=native -x -vvvv src/hypergen/test_all.py
testcafe-run:
cd examples && testcafe chrome test_all.js -q attemptLimit=5,successThreshold=1 |& ansi2txt
testcafe-run-headless:
cd examples && testcafe ""chrome:headless"" test_all.js -q attemptLimit=5,successThreshold=1
test-all:
make pytest-run
make testcafe-run-headless
pypi-build:
rm -rf dist/*
python3 -m build
pypi-check:
python3 -m twine check dist/*
pypi-show:
rm -rf /tmp/hypergen_test_build
virtualenv --python=python3.9 /tmp/hypergen_test_build
source /tmp/hypergen_test_build/bin/activate && \
pip install dist/*.whl && \
tree /tmp/hypergen_test_build/lib/python3.9/site-packages/django_hypergen-1.5.1.dist-info/ && \
tree /tmp/hypergen_test_build/lib/python3.9/site-packages/hypergen/
pypi-release-test:
python3 -m twine upload --repository testpypi dist/*
pypi-release:
python3 -m twine upload dist/*