[CMF-checkins] SVN: CMF/trunk/ - removed obsolete slurp_release script
Yvo Schubbe
y.2010 at wcm-solutions.de
Fri Aug 6 05:03:40 EDT 2010
Log message for revision 115517:
- removed obsolete slurp_release script
Changed:
U CMF/trunk/RELEASE.txt
D CMF/trunk/slurp_release.py
-=-
Modified: CMF/trunk/RELEASE.txt
===================================================================
--- CMF/trunk/RELEASE.txt 2010-08-06 08:54:34 UTC (rev 115516)
+++ CMF/trunk/RELEASE.txt 2010-08-06 09:03:40 UTC (rev 115517)
@@ -1,14 +1,5 @@
RELEASE.txt - how to create a CMF release
- Most of the work necessary to create a CMF release is done by the script
- 'slurp_release.py', which can always be found in the root of the CMF
- package on the Subversion trunk. The script will svn export the CMF
- package, build the tarballs, and upload them and the respective READMEs
- to the CMF area on www.zope.org.
-
- Before running 'slurp_release.py' the respective branch needs to be cleaned
- up and tagged properly.
-
**Important note**: Always run all CMF unit tests before even thinking of
cutting a new release.
@@ -46,10 +37,6 @@
- Find all 'version.txt' files throughout the CMF package and adjust
the version number, in this case 'CMF-1.8.4-beta2'.
- - Check all DEPENDENCIES.txt files and ensure the lowest common
- denominator for packages not being shipped as part of the CMF tarball
- is correctly mentioned in INSTALL.txt
-
- Check these changes into the Subversion repository
- Create the Subversion tag by svn copying the head of the release
@@ -62,51 +49,6 @@
the external definition adjusted to point to the tag.
- **Creating and publishing the release**
-
- Now that the Subversion repository is prepared the files need to be put onto
- zope.org. First of all, the Software Release object needs to be created.
- Go to http://www.zope.org/Products/CMF and create a Software Release
- from the Folder Contents view:
-
- - Name CMF-1.8.4-beta2
-
- - Version 1.8.4-beta2
-
- - Maturity value depends on status: beta releases are 'development'
-
- - License ZPL
-
- - Info URL '/Products/CMF/CMF-1.8.4-beta2/README.txt'
-
- - License URL '/Resources/License/ZPL-2.1'
-
- - Changes URL '/Products/CMF/CMF-1.8.4-beta2/CHANGES.txt'
-
- - Installation URL '/Products/CMF/CMF-1.8.4-beta2/INSTALL.txt'
-
- Make sure to publish this Software Release. Due to a problem with the
- zope.org site at the time of this writing, you need to specify an
- effective date on the publishing form if you want the item to show up on
- the zope.org front page. Just choose the current data using the date
- picker widget.
-
- With Subversion and zope.org preparations done the 'slurp_release.py'
- script will do the remaining work. You run it with version ID
- (like '1.8.4-beta2') as parameter::
-
- slurp_release.py [options] version_id
-
- slurp_release can be run from anywhere, it does not depend on your
- Subversion sandbox because it will create its own. Without any options
- it will complete the whole procedure including upload to the zope.org site.
- Use 'slurp_release.py --help' to find out more.
-
- Once 'slurp_release.py' has completed the upload step you need to visit
- the uploaded files on zope.org and make sure they get published on the
- site. See the note about specifying an effective date above.
-
-
**Announcing the release**
An announcement email should go out to zope-announce at zope.org,
Deleted: CMF/trunk/slurp_release.py
===================================================================
--- CMF/trunk/slurp_release.py 2010-08-06 08:54:34 UTC (rev 115516)
+++ CMF/trunk/slurp_release.py 2010-08-06 09:03:40 UTC (rev 115517)
@@ -1,201 +0,0 @@
-#!/usr/bin/python
-""" Make a CMF release.
-"""
-
-import sys
-import os
-import httplib
-import getopt
-import base64
-import mimetypes
-
-SVNROOT = 'svn://svn.zope.org/repos/main/CMF'
-
-class ReleasePackage:
-
- _release_tag = _version_id = _userid = _password = None
-
- def __init__( self, args ):
-
- self._parseArgs( args )
-
- #
- # Packaging API
- #
- def exportReleaseFiles( self ):
-
- """ Do the Subversion export of CMF for a given release.
- """
- tag_dir = '%s/tags/%s' % (SVNROOT, self._release_tag)
- os.system( 'rm -rf %s' % self._version_id )
- command = ('/usr/bin/env svn export %s %s' % (tag_dir, self._version_id))
-
- os.system( command )
-
- def makeArchives( self ):
-
- """ Create tarball and zipfile for release.
- """
- tar_command = ( '/bin/tar czf %s.tar.gz %s'
- % ( self._version_id, self._version_id ) )
-
- zip_command = ( '/usr/bin/zip -r %s.zip %s'
- % ( self._version_id, self._version_id ) )
-
- try:
- os.remove( '%s.tar.gz' % self._version_id )
- except OSError:
- pass
-
- try:
- os.remove( '%s.zip' % self._version_id )
- except OSError:
- pass
-
- os.system( tar_command )
- os.system( zip_command )
-
- def uploadArchives( self ):
-
- """ Upload the tarball / zipfile for the release to the dogbowl.
- """
- tarball = '%s.tar.gz' % ( self._version_id )
- self._uploadFile( tarball )
-
- zipfile = '%s.zip' % ( self._version_id )
- self._uploadFile( zipfile )
-
- def uploadDocs( self ):
-
- """ Upload the text files for the release to the dogbowl.
- """
- curdir = os.getcwd()
- os.chdir( self._version_id )
- try:
- self._uploadFile( 'CHANGES.txt' )
- self._uploadFile( 'HISTORY.txt' )
- self._uploadFile( 'INSTALL.txt' )
- self._uploadFile( 'LICENSE.txt' )
- self._uploadFile( 'README.txt' )
- finally:
- os.chdir( curdir )
-
- def doWholeEnchilada( self ):
-
- """ Run the whole enchilada.
- """
- self.exportReleaseFiles()
- self.makeArchives()
- self.uploadArchives()
- self.uploadDocs()
-
- def run( self ):
- self._runCommand()
-
- #
- # Helper methods
- #
- def _usage( self ):
-
- """ How are we used?
- """
- USAGE = """\
-slurp_release [options] version_id
-
-options:
-
- -?, -h, --help Print this usage message
-
- -x, --execute Select a particular step. Available steps are:
-
- exportReleaseFiles
- makeArchives
- uploadArchives
- uploadDocs
- doWholeEnchilada (default)
-
- -a, --auth Use authentication pair, in fmt 'userid:password'
-"""
- values = {}
- print USAGE % values
- sys.exit( 2 )
-
- def _parseArgs( self, args ):
-
- """ Figure out which release, who, etc?
- """
- command = 'doWholeEnchilada'
- try:
- opts, args = getopt.getopt( args
- , '?hx:a:'
- , [ 'help'
- , 'execute='
- , 'auth='
- ]
- )
- except getopt.GetoptError:
- self._usage()
-
- for k, v in opts:
-
- if k == '-?' or k == '-h' or k == '--help':
- self._usage()
-
- if k == '-x' or k == '--execute':
- command = v
-
- if k == '-a' or k == '--auth':
- self._userid, self._password = v.split( ':' )
-
- self._command = command
-
- if len( args ) != 1:
- self._usage()
-
- self._release_tag = args[0]
- self._version_id = 'CMF-%s' % self._release_tag
-
- def _runCommand( self ):
-
- """ Do the specified command.
- """
- getattr( self, self._command )()
-
- def _getAuthHeaders( self ):
-
- """ Return the HTTP headers.
- """
- headers = {}
- if self._userid:
- auth = base64.encodestring( '%s:%s'
- % ( self._userid, self._password ) )
- headers[ 'Authorization' ] = 'Basic %s' % auth
- return headers
-
- def _uploadFile( self, filename ):
-
- """ Upload the zipfile for the release to the dogbowl.
- """
- URL = ( '/Products/CMF/%s/%s' % ( self._version_id, filename ) )
- body = open( filename ).read()
- content_type, content_enc = mimetypes.guess_type(URL)
- headers = self._getAuthHeaders()
- headers['Content-Length'] = len(body)
- headers['Content-Type'] = content_type
- headers['Content-Encoding'] = content_enc
-
- conn = httplib.HTTPConnection( 'www.zope.org' )
- print 'PUTting file, %s, to URL, %s' % ( filename, URL )
-
- conn.request( 'PUT', URL, body, headers )
- response = conn.getresponse()
- if int( response.status ) not in ( 200, 201, 204, 302 ):
- raise ValueError, 'Failed: %s (%s)' % ( response.status
- , response.reason )
-
-
-if __name__ == '__main__':
-
- pkg = ReleasePackage( sys.argv[1:] )
-
- pkg.run()
More information about the CMF-checkins
mailing list