subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r1145230 - in /subversion/trunk/tools/dist: release.py templates/rc-release-ann.ezt templates/stable-release-ann.ezt
Date Mon, 11 Jul 2011 16:27:45 GMT
Author: hwright
Date: Mon Jul 11 16:27:45 2011
New Revision: 1145230

URL: http://svn.apache.org/viewvc?rev=1145230&view=rev
Log:
release.py: Provide sha1 and release information when writing announcements.
This is still a bit hacked, but works.

* tools/dist/templates/stable-release-ann.ezt,
  tools/dist/templates/rc-release-ann.ezt:
    Iterate over the provided sha1 info.

* tools/dist/release.py
  (get_sha1info): New.
  (write_announcement): Use actual values for the sha1 info and version numbers.

Modified:
    subversion/trunk/tools/dist/release.py
    subversion/trunk/tools/dist/templates/rc-release-ann.ezt
    subversion/trunk/tools/dist/templates/stable-release-ann.ezt

Modified: subversion/trunk/tools/dist/release.py
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/release.py?rev=1145230&r1=1145229&r2=1145230&view=diff
==============================================================================
--- subversion/trunk/tools/dist/release.py (original)
+++ subversion/trunk/tools/dist/release.py Mon Jul 11 16:27:45 2011
@@ -37,6 +37,7 @@
 # Stuff we need
 import os
 import sys
+import glob
 import shutil
 import urllib2
 import hashlib
@@ -413,15 +414,34 @@ def write_news(args):
     template.generate(sys.stdout, data)
 
 
+def get_sha1info(args):
+    'Return a list of sha1 info for the release'
+    sha1s = glob.glob(os.path.join(get_deploydir(args.base_dir), '*.sha1'))
+
+    class info(object):
+        pass
+
+    sha1info = []
+    for s in sha1s:
+        i = info()
+        i.filename = os.path.basename(s)[:-5]
+        i.sha1 = open(s, 'r').read()
+        sha1info.append(i)
+
+    return sha1info
+
+
 def write_announcement(args):
     'Write the release announcement.'
     version_base, version_extra = split_version(args.version)
 
+    sha1info = get_sha1info(args)
+
     data = { 'version'              : args.version,
-             'sha1info'             : 'foo',
+             'sha1info'             : sha1info,
              'siginfo'              : 'bar', 
-             'major-minor'          : 'boo',
-             'major-minor-patch'    : 'baz',
+             'major-minor'          : version_base[:3],
+             'major-minor-patch'    : version_base,
            }
 
     if version_extra:

Modified: subversion/trunk/tools/dist/templates/rc-release-ann.ezt
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/templates/rc-release-ann.ezt?rev=1145230&r1=1145229&r2=1145230&view=diff
==============================================================================
--- subversion/trunk/tools/dist/templates/rc-release-ann.ezt (original)
+++ subversion/trunk/tools/dist/templates/rc-release-ann.ezt Mon Jul 11 16:27:45 2011
@@ -5,8 +5,8 @@ Please choose the mirror closest to you 
 
 The SHA1 checksums are:
 
-[sha1info]
-
+[for sha1info]    [sha1info.sha1] [sha1info.filename]
+[end]
 PGP Signatures are available at:
 
     http://www.apache.org/dist/subversion/subversion-[version].tar.bz2.asc

Modified: subversion/trunk/tools/dist/templates/stable-release-ann.ezt
URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dist/templates/stable-release-ann.ezt?rev=1145230&r1=1145229&r2=1145230&view=diff
==============================================================================
--- subversion/trunk/tools/dist/templates/stable-release-ann.ezt (original)
+++ subversion/trunk/tools/dist/templates/stable-release-ann.ezt Mon Jul 11 16:27:45 2011
@@ -5,8 +5,8 @@ Please choose the mirror closest to you 
 
 The SHA1 checksums are:
 
-[sha1info]
-
+[for sha1info]    [sha1info.sha1] [sha1info.filename]
+[end]
 PGP Signatures are available at:
 
     http://www.apache.org/dist/subversion/subversion-[version].tar.bz2.asc



Mime
View raw message