forked from readthedocs/readthedocs.org
-
Notifications
You must be signed in to change notification settings - Fork 0
/
fabfile.py
39 lines (29 loc) · 979 Bytes
/
fabfile.py
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
from fabric.api import lcd, local
from fabric.decorators import runs_once
import os
fabfile_dir = os.path.dirname(__file__)
def i18n_push_source():
"""rebuild and push the source language to transifex"""
with lcd('readthedocs'):
local('rm -rf rtd_tests/tests/builds/')
local('django-admin makemessages -l en')
local('tx push -s')
local('django-admin compilemessages -l en')
def i18n_pull():
"""pull the updated translation from transifex"""
with lcd('readthedocs'):
local('rm -rf rtd_tests/tests/builds/')
local('tx pull -f ')
local('django-admin makemessages --all')
local('django-admin compilemessages')
def i18n_docs():
with lcd('docs'):
# Update our tanslations
local('tx pull -a')
local('sphinx-intl build')
# Push new ones
local('make gettext')
local('tx push -s')
@runs_once
def spider():
local('patu.py -d1 readthedocs.org')