forked from testvidya11/softlayer-api-python-client
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfabfile.py
More file actions
33 lines (22 loc) · 743 Bytes
/
fabfile.py
File metadata and controls
33 lines (22 loc) · 743 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
33
from fabric.api import local, lcd, puts, abort
def make_html():
"Build HTML docs"
with lcd('docs'):
local('make html')
def upload():
"Upload distribution to PyPi"
local('python setup.py sdist register upload')
def release(version, force=False):
"""Perform a release. Example:
$ fab release:3.0.0
"""
if version.startswith("v"):
abort("Version should not start with 'v'")
version_str = "v%s" % version
puts(" * Tagging Version %s" % version_str)
f = 'f' if force else ''
local("git tag -%sam \"%s\" %s" % (f, version_str, version_str))
puts(" * Uploading to PyPI")
upload()
puts(" * Pushing Tag to upstream")
local("git push upstream %s" % version_str)