forked from imwilsonxu/fbone
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfabfile.py
51 lines (35 loc) · 871 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
40
41
42
43
44
45
46
47
48
49
50
51
# -*- coding: utf-8 -*-
# http://docs.fabfile.org/en/1.5/tutorial.html
from fabric.api import *
project = "fbone"
# the user to use for the remote commands
env.user = ''
# the servers where the commands are executed
env.hosts = ['']
def reset():
"""
Reset local debug env.
"""
local("rm -rf /tmp/instance")
local("mkdir /tmp/instance")
local("python manage.py initdb")
def setup():
"""
Setup virtual env.
"""
local("virtualenv env")
activate_this = "env/bin/activate_this.py"
execfile(activate_this, dict(__file__=activate_this))
local("python setup.py install")
reset()
def d():
"""
Debug.
"""
reset()
local("python manage.py run")
def babel():
"""
Babel compile.
"""
local("python setup.py compile_catalog --directory `find -name translations` --locale zh -f")