forked from privacyidea/privacyidea
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
63 lines (52 loc) · 1.64 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
info:
@echo "make clean - remove all automatically created files"
@echo "make doc-man - create the documentation as man-page"
@echo "make doc-html - create the documentation as html"
@echo "make pypi - upload package to pypi"
@echo "make translate - translate WebUI"
@echo "make translate-server - translate string in the server code."
SIGNING_KEY=53E66E1D2CABEFCDB1D3B83E106164552E8D8149
clean:
find . -name \*.pyc -exec rm {} \;
rm -fr build/
rm -fr dist/
rm -fr cover
rm -f .coverage
(cd doc; make clean)
setversion:
vim Makefile
vim setup.py
vim doc/conf.py
vim Changelog
@echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
@echo "Please set a tag like: git tag 3.17"
POS = $(wildcard po/*.po)
translate:
grunt nggettext_extract
for language in $(POS); do \
msgmerge -U --backup=off $$language po/template.pot; \
done
grunt nggettext_compile
translate-server:
(cd privacyidea; pybabel extract -F babel.cfg -k lazy_gettext -o messages.pot .)
# pybabel init -i messages.pot -d translations -l de
(cd privacyidea; pybabel update -i messages.pot -d translations)
# create the .mo file
(cd privacyidea; pybabel compile -d translations)
pypi:
make doc-man
rm -fr dist
python setup.py sdist
gpg --detach-sign -a --default-key ${SIGNING_KEY} dist/*.tar.gz
twine upload dist/*.tar.gz dist/*.tar.gz.asc
doc-man:
(cd doc; make man)
doc-html:
(cd doc; make html)
NPM_VERSION := $(shell npm --version 2>/dev/null)
update-contrib:
ifdef NPM_VERSION
(cd privacyidea/static && npm install && ./update_contrib.sh)
else
@echo "Command 'npm' not found! It is needed to install the JS contrib libraries."
endif