root/make_release.py

Revision 49:2f2a7a41edac, 0.8 KB (checked in by msmits, 16 months ago)

moved imapclient trunk to correct location

  • Property exe set to *
Line 
1#!/usr/bin/python
2
3'''
4Release script for IMAPClient
5'''
6
7import os
8import sys
9import imapclient
10
11DIST_DIR = '../dist'
12SVN_URL = 'svn://jiali.freshfoo.com'
13
14def fatal(msg):
15    sys.stderr.write(msg+'\n')
16    sys.exit(1)
17
18os.system('find -name "*.pyc" | xargs rm -f')
19os.system('rm -rf IMAPClient.egg-info')
20
21# Check for stale commits
22if os.popen('svn status').readlines():
23    fatal("Stale commits, please fix")
24
25# Tag in svn
26exitcode = os.system('svn cp '
27    '-m "tagging IMAPClient %(version)s" '
28    '%(svn_url)s/trunk/IMAPClient '
29    '%(svn_url)s/tags/IMAPClient/%(version)s' % dict(
30        version=imapclient.__version__,
31        svn_url=SVN_URL,
32    )
33)
34if exitcode:
35    sys.exit(2)
36
37# Create distribution archives
38os.system('python setup.py sdist -d %s --formats=gztar,zip' % DIST_DIR)
39os.system('rm -rf IMAPClient.egg-info')
Note: See TracBrowser for help on using the browser.