Skip to content

Commit

Permalink
Release tools
Browse files Browse the repository at this point in the history
  • Loading branch information
Barnaby Gray committed Nov 23, 2013
1 parent 9a23705 commit af2c029
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 1 deletion.
17 changes: 17 additions & 0 deletions release.sh
@@ -0,0 +1,17 @@
#!/bin/bash -e

sublime -w setup.py:4
VERSION=$(python setup.py --version)

# make changelog
echo -e "$VERSION\n" > /tmp/changelog
git log --format='- %s%n' $(git describe --abbrev=0).. >> /tmp/changelog
sublime -w README.markdown:166 /tmp/changelog
rm /tmp/changelog

git add README.markdown setup.py
git commit -m $VERSION
git push
python setup.py release

echo "$VERSION released"
2 changes: 2 additions & 0 deletions setup.cfg
@@ -0,0 +1,2 @@
[aliases]
release = tag sdist upload
26 changes: 25 additions & 1 deletion setup.py
@@ -1,8 +1,32 @@
from setuptools import setup
from setuptools import Command

__version__ = '0.3.6'
__version__ = '0.4.0'
long_description = file('README.markdown','r').read()

class tag(Command):
"""Tag git release."""

description = __doc__
user_options = []

def initialize_options(self):
pass

def finalize_options(self):
pass

def run(self):
import versiontools
import subprocess
version = versiontools.format_version(__version__)
ret = subprocess.call(['git', 'tag', '-a', version, '-m', version])
if ret:
raise SystemExit("git tag failed")
ret = subprocess.call(['git', 'push', '--tags'])
if ret:
raise SystemExit("git push --tags failed")

setup(name='cli53',
version=__version__,
description='Command line script to administer the Amazon Route 53 DNS service',
Expand Down

0 comments on commit af2c029

Please sign in to comment.