forked from tschellenbach/Django-facebook
-
Notifications
You must be signed in to change notification settings - Fork 1
/
fabfile.py
55 lines (42 loc) · 1.58 KB
/
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
52
53
54
55
from fabric.api import local, cd
import os
PROJECT_ROOT = os.path.abspath(os.path.dirname(__file__))
manage_py = os.path.join('facebook_example', 'manage.py')
def publish(test='yes'):
'''
Easy publishing of my nice open source project
'''
if test == 'yes':
validate()
local('git push')
from django_facebook import __version__
tag_name = 'v%s' % __version__
local('python setup.py sdist upload')
local('git tag %s' % tag_name)
local('git push origin --tags')
def validate():
with cd(PROJECT_ROOT):
local(
'pep8 --exclude=migrations --ignore=E501,E225 django_facebook open_facebook')
local('python %s test open_facebook django_facebook' % manage_py)
def full_validate():
with cd(PROJECT_ROOT):
local(
'pep8 --exclude=migrations --ignore=E501,E225 django_facebook open_facebook')
local(
'CUSTOM_USER_MODEL=0 python %s test open_facebook django_facebook' %
manage_py)
local(
'CUSTOM_USER_MODEL=1 python %s test open_facebook django_facebook' %
manage_py)
local(
'CUSTOM_USER_MODEL=0 MODE=userena python %s test open_facebook django_facebook' %
manage_py)
def clean():
local('bash -c "autopep8 -i *.py"')
local('bash -c "autopep8 -i django_facebook/*.py"')
local('bash -c "autopep8 -i open_facebook/*.py"')
local('bash -c "autopep8 -i django_facebook/management/commands/*.py"')
local('bash -c "autopep8 -i django_facebook/test_utils/*.py"')
def docs():
local('sphinx-build -Eav docs html')