Skip to content

Commit

Permalink
- added version parameter to create_release in fabfile.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kunitoki committed Jul 27, 2014
1 parent dbfb5af commit 313d675
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion fabfile.py
Expand Up @@ -48,11 +48,22 @@ def pypi_upload(where="pypitest"):

#==============================================================================
@task
def create_release():
def create_release(version=None):
with lcd("."):
# update version file if present
if version is not None:
local("sed -ie 's/[0-9]*\.[0-9]*/%s/' custard/__init__.py" % version)
local("git commit -a -m 'Bump release %s'" % version)
local("git push")

# remove tag if present
with settings(warn_only=True):
local("git tag -d %s && git push origin :refs/tags/%s" % (VERSION, VERSION))

# create tag
local("git tag %s" % VERSION)
local("git push --tags")

# register with pypi and upload
local("python setup.py register -r pypi")
local("python setup.py sdist upload -r pypi")

0 comments on commit 313d675

Please sign in to comment.