Author: gstein
Date: Thu Mar 8 20:05:51 2012
New Revision: 1298552
URL: http://svn.apache.org/viewvc?rev=1298552&view=rev
Log:
Adjust our download output to correspond to the [version] used in r1298548.
* tools/dist/release.py:
(clean_dist): remove unused REGEX localvar
(get_sha1info): optional parameter to replace x.y.z with [version]
(write_downloads): do the fname replacement
Modified:
subversion/trunk/tools/dist/release.py
Modified: subversion/trunk/tools/dist/release.py
URL:
http://svn.apache.org/viewvc/subversion/trunk/tools/dist/release.py?rev=1298552&r1=1298551&r2=1298552&view=diff
==============================================================================
--- subversion/trunk/tools/dist/release.py (original)
+++ subversion/trunk/tools/dist/release.py Thu Mar 8 20:05:51 2012
@@ -485,8 +485,6 @@ def post_candidates(args):
def clean_dist(args):
'Clean the distribution directory of all but the most recent artifacts.'
- regex =
re.compile('subversion-(\d+).(\d+).(\d+)(?:-(?:(rc|alpha|beta)(\d+)))?')
-
if not args.dist_dir:
assert_people()
args.dist_dir = people_dist_dir
@@ -556,7 +554,7 @@ def write_news(args):
template.generate(sys.stdout, data)
-def get_sha1info(args):
+def get_sha1info(args, replace=False):
'Return a list of sha1 info for the release'
sha1s = glob.glob(os.path.join(get_deploydir(args.base_dir), '*.sha1'))
@@ -566,7 +564,13 @@ def get_sha1info(args):
sha1info = []
for s in sha1s:
i = info()
- i.filename = os.path.basename(s)[:-5]
+ # strip ".sha1"
+ fname = os.path.basename(s)[:-5]
+ if replace:
+ # replace the version number with the [version] reference
+ i.filename = Version.regex.sub('[version]', fname)
+ else:
+ i.filename = fname
i.sha1 = open(s, 'r').read()
sha1info.append(i)
@@ -596,7 +600,7 @@ def write_announcement(args):
def write_downloads(args):
'Output the download section of the website.'
- sha1info = get_sha1info(args)
+ sha1info = get_sha1info(args, replace=True)
data = { 'version' : str(args.version),
'fileinfo' : sha1info,