Permalink
Browse files

Release tools

  • Loading branch information...
1 parent 9a23705 commit af2c029539d9afcdbb176ad310b95bd081810444 Barnaby Gray committed Nov 23, 2013
Showing with 44 additions and 1 deletion.
  1. +17 −0 release.sh
  2. +2 −0 setup.cfg
  3. +25 −1 setup.py
View
@@ -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"
View
@@ -0,0 +1,2 @@
+[aliases]
+release = tag sdist upload
View
@@ -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',

0 comments on commit af2c029

Please sign in to comment.