forked from gnowledge/ncert_nroer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
64 lines (51 loc) · 1.66 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
# Makefile for gstudio
#
# Aim to simplify development and release process
# Be sure you have run the buildout, before using this Makefile
NO_COLOR = \033[0m
COLOR = \033[32;01m
SUCCESS_COLOR = \033[35;01m
all: kwalitee test docs clean package
package:
@echo "$(COLOR)* Creating source package for Gstudio$(NO_COLOR)"
@python setup.py sdist
test:
@echo "$(COLOR)* Launching the tests suite$(NO_COLOR)"
@./bin/test
coverage:
@echo "$(COLOR)* Generating coverage report$(NO_COLOR)"
@./bin/cover
epydoc:
@echo "$(COLOR)* Generating API documentation$(NO_COLOR)"
@export DJANGO_SETTINGS_MODULE='demo.settings' && ./bin/api
sphinx:
@echo "$(COLOR)* Generating Sphinx documentation$(NO_COLOR)"
@./bin/docs
@cp -r ./docs/build/html ./docs/
docs: coverage epydoc sphinx
kwalitee:
@echo "$(COLOR)* Running pyflakes$(NO_COLOR)"
@./bin/pyflakes gstudio
@echo "$(COLOR)* Running pep8$(NO_COLOR)"
@./bin/pep8 --count --exclude=migrations gstudio
@echo "$(SUCCESS_COLOR)* No kwalitee errors, Congratulations ! :)$(NO_COLOR)"
translations:
@echo "$(COLOR)* Generating english translation$(NO_COLOR)"
@cd gstudio && ../bin/django makemessages --extension=.html,.txt -l en
@echo "$(COLOR)* Pushing translation to Transifex$(NO_COLOR)"
@rm -rf .tox
@tx push -s
@echo "$(COLOR)* Remove english translation$(NO_COLOR)"
@rm -rf gstudio/locale/en/
clean:
@echo "$(COLOR)* Removing useless files$(NO_COLOR)"
@find demo gstudio docs -type f \( -name "*.pyc" -o -name "\#*" -o -name "*~" \) -exec rm -f {} \;
@rm -f \#* *~
@rm -rf uploads
@rm -rf .tox
mrproper: clean
@rm -rf docs/build/doctrees
@rm -rf docs/build/html
@rm -rf docs/html
@rm -rf docs/coverage
@rm -rf docs/api