forked from Fashiolista/ec2cluster
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfabfile.py
More file actions
32 lines (24 loc) · 839 Bytes
/
fabfile.py
File metadata and controls
32 lines (24 loc) · 839 Bytes
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
from fabric.api import local, cd
import os, sys
PROJECT_ROOT = os.path.abspath(os.path.join(__file__, '../'))
sys.path.insert(0, PROJECT_ROOT)
def publish(run_tests=True):
""" Update pip, create a git tag.
"""
if run_tests:
validate()
local('git push')
from ec2cluster 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 ec2cluster')
local('pyflakes ec2cluster')
local('python -m unittest ec2cluster.tests')
def clean():
local('bash -c "autopep8 -i *.py"')
local('bash -c "autopep8 -i ec2cluster/*.py"')
local('bash -c "autopep8 -i ec2cluster/utils/*.py"')