forked from web2py/py4web
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
52 lines (51 loc) · 1.86 KB
/
Makefile
File metadata and controls
52 lines (51 loc) · 1.86 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
.PHONY: clean build assets install test deploy
clean:
find . -name '*.pyc' -delete
find . -name '*~' -delete
find . -name '#*' -delete
rm -rf dist/*
python3 setup.py clean
assets:
rm -f py4web/assets/*
mkdir -p py4web/assets
cd apps/_dashboard; \
find . | egrep "\.(py|html|css|js|png|jpg|gif|json|yaml|md|txt)$$" | \
zip -@ ../../py4web/assets/py4web.app._dashboard.zip
cd apps/_default; \
find . | egrep "\.(py|html|css|js|png|jpg|gif|json|yaml|md|txt)$$" | \
zip -@ ../../py4web/assets/py4web.app._default.zip
cd apps/_scaffold; \
find . | egrep "\.(py|html|css|js|png|jpg|gif|json|yaml|md|txt)$$" | \
zip -@ ../../py4web/assets/py4web.app._scaffold.zip
cd apps/_minimal; \
find . | egrep "\.(py|html|css|js|png|jpg|gif|json|yaml|md|txt)$$" | \
zip -@ ../../py4web/assets/py4web.app._minimal.zip
cd apps/_documentation; \
find . | egrep "\.(py|html|css|js|png|jpg|gif|json|yaml|md|txt|mm)$$" | \
zip -@ ../../py4web/assets/py4web.app._documentation.zip
build: clean assets
python3 setup.py build
install: build
python3 setup.py install
test: build
python3 -m pip install -r requirements.txt
python3 -m pip install -r test-requirements.txt
python3 -m pytest --cov=py4web --cov-report html:cov.html -v -s tests/
push: test
git push origin master
deploy: test
python2.7 setup.py sdist
twine upload dist/*
setup:
./py4web.py setup apps
./py4web.py set_password
run:
./py4web.py run -p password.txt apps
upgrade-utils:
find apps -name "utils.js" -exec cp apps/_dashboard/static/js/utils.js {} \;
upgrade-axios:
curl -L https://unpkg.com/axios/dist/axios.min.js > apps/_dashboard/static/js/axios.min.js
find apps -name "axios.min.js" -exec cp apps/_dashboard/static/js/axios.min.js {} \;
upgrade-vue:
curl -L https://unpkg.com/vue/dist/vue.min.js > apps/_dashboard/static/js/vue.min.js
find apps -name "vue.min.js" -exec cp apps/_dashboard/static/js/vue.min.js {} \;