-
Notifications
You must be signed in to change notification settings - Fork 3
/
fabfile.py
33 lines (24 loc) · 831 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
from fabric.api import local, cd
import os
PROJECT_ROOT = os.path.abspath(os.path.join(__file__, '../'))
def publish(test='yes'):
'''
Easy publishing of my nice open source project
'''
if test == 'yes':
validate()
local('git push')
from snaptastic 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 snaptastic')
local('pyflakes.py -x W snaptastic')
local('python -m unittest snaptastic.tests')
def clean():
local('bash -c "autopep8 -i *.py"')
local('bash -c "autopep8 -i snaptastic/*.py"')
local('bash -c "autopep8 -i snaptastic/utils/*.py"')