-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
59 lines (46 loc) · 1.44 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
install:
virtualenv -p python3 venv
venv/bin/pip install -e .
venv/bin/python manage.py migrate --noinput
$(MAKE) deploy_deps
deploy_deps:
virtualenv -p python2 .ansible-venv
.ansible-venv/bin/pip install ansible
deps:
sudo apt-get install libtiff5-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.6-dev tk8.6-dev python-tk libxslt-dev libxml2-dev redis-server
deps_mac:
brew install libtiff libjpeg webp little-cms2 redis-server
deps_freebsd:
sudo pkg install jpeg tiff webp lcms2 freetype2 redis
test:
rm -rf .tox
detox
clean:
rm -rf *.egg-info
rm -rf build
rm -rf dist
reset:
deactivate
$(MAKE) clean
rm -rf venv
rm -rf .ansible-venv
run:
venv/bin/python manage.py runserver_plus
tag-release:
sed -i "/__version__/c\__version__ = '$(v)'" beehve/__init__.py
git add beehve/__init__.py && git commit -m "Automated version bump to $(v)" && git push
git tag -a release/$(v) -m "Automated release of $(v) via Makefile" && git push origin --tags
package:
rm -rf build
python setup.py clean
python setup.py build sdist bdist_wheel
distribute:
twine upload -s dist/beehve-$(v)*
release:
$(MAKE) tag-release
$(MAKE) package
$(MAKE) distribute
deploy:
$(MAKE) deploy_deps
ansible-playbook -i ansible/hosts --limit prod --tags deploy --extra-vars '{"app_version":"$(v)"}' ansible/webapp.yml
ansible-playbook -i ansible/hosts --limit prod --tags deploy --extra-vars '{"app_version":"$(v)"}' ansible/workers.yml