]> khamidou — GitHub mirrors - imapclient.git/commitdiff
Python version of the release script, uses setup.py
authormsmits <none@none>
Wed, 2 May 2007 19:44:03 +0000 (19:44 +0000)
committermsmits <none@none>
Wed, 2 May 2007 19:44:03 +0000 (19:44 +0000)
imapclient/make_release [new file with mode: 0755]

diff --git a/imapclient/make_release b/imapclient/make_release
new file mode 100755 (executable)
index 0000000..e0230fa
--- /dev/null
@@ -0,0 +1,34 @@
+#!/usr/bin/python
+
+'''
+Release script for imapclient
+'''
+
+import os
+import sys
+import imapclient
+
+DIST_DIR = '../dist'
+
+def fatal(msg):
+    sys.stderr.write(msg+'\n')
+    sys.exit(1)
+
+os.system('rm -f *.pyc')
+
+# Check for stale commits
+if os.popen('svn status').readlines():
+    fatal("Stale commits, please fix")
+
+# Tag in svn
+exitcode = os.system('svn cp '
+    '-m "tagging imapclient "%s" '
+    'file:///home/msmits/svnroot/trunk/imapclient '
+    'file:///home/msmits/svnroot/tags/imapclient/$version ' % (
+        imapclient.__version__))
+if exitcode:
+    sys.exit(2)
+
+# Create distribution archives
+os.system('python setup.py sdist -d %s --formats=gztar,zip' % DIST_DIR)
+