-
Notifications
You must be signed in to change notification settings - Fork 26
/
Makefile
73 lines (56 loc) · 1.43 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
CWD = $(shell pwd)
SRC_DIR = ${CWD}/pootle
WEBSITE_DIR = ${CWD}/website
STATIC_DIR = ${SRC_DIR}/static
JS_DIR = ${STATIC_DIR}/js
FORMATS=--formats=bztar
POOTLE_CMD = $(shell sh -c "command -v zing")
ifeq ($(POOTLE_CMD),)
POOTLE_CMD=python manage.py
endif
.PHONY: all build clean test pot help docs assets
all: help
build: docs assets
python setup.py sdist ${FORMATS} ${TAIL}
assets:
${POOTLE_CMD} build_assets
docs:
cd ${WEBSITE_DIR} && \
npm ci && \
npm run build ${TAIL}
clean:
npm cache clear
pot:
@${SRC_DIR}/tools/createpootlepot
linguas:
@${SRC_DIR}/tools/make-LINGUAS.sh 80 > ${SRC_DIR}/locale/LINGUAS
lint: lint-python lint-js lint-css
lint-py: lint-python
lint-python:
flake8 --config=setup.cfg && \
black --check . && \
isort --check-only --diff && \
pylint --rcfile=.pylint-travisrc pootle tests
lint-js:
cd ${JS_DIR} \
&& npm run lint
lint-css:
cd ${JS_DIR} \
&& npm run stylelint
test-js:
cd ${JS_DIR} \
&& npm test
publish-pypi:
python setup.py sdist ${FORMATS} upload
help:
@echo "Help"
@echo "----"
@echo
@echo " assets - collect and rebuild the static assets"
@echo " build - create sdist with required prep"
@echo " docs - build the Zing website"
@echo " clean - remove temporary files"
@echo " test - run test suite"
@echo " pot - update the POT translations templates"
@echo " linguas - update the LINGUAS file with languages over 80% complete"
@echo " publish-pypi - publish on PyPI"