From 6df1c8a0ac2a43171d961f57de4accaf25c611a9 Mon Sep 17 00:00:00 2001 From: Hans-Christoph Steiner Date: Wed, 21 Jan 2009 23:11:38 +0000 Subject: - switched the "latest" section of the website to be a list of the most recent completed builds, generated by a new python script - removed old latest stuff from prep-auto-build-upload and fixed the quoting svn path=/trunk/; revision=10590 --- scripts/auto-build/create-latest-build-listing.py | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100755 scripts/auto-build/create-latest-build-listing.py (limited to 'scripts/auto-build/create-latest-build-listing.py') diff --git a/scripts/auto-build/create-latest-build-listing.py b/scripts/auto-build/create-latest-build-listing.py new file mode 100755 index 00000000..eb201205 --- /dev/null +++ b/scripts/auto-build/create-latest-build-listing.py @@ -0,0 +1,30 @@ +#!/usr/bin/python + +import string +import os,sys,errno +import re +import StringIO + + +for root, dirs, files in os.walk('/var/www/auto-build/'): + dirs.sort() + if 'latest' in dirs: + dirs.remove('latest') + if 'test' in dirs: + dirs.remove('test') + for name in files: + m = re.search('^Pd-[01]\.[0-9][0-9].*[^5]$', name) + if m: + commonbuildname = re.sub('-20[01][0-9][01][0-9][0-9][0-9]', '', name) + commonbuildpath = os.path.join('/var/www/auto-build/test', commonbuildname) + buildtarball = os.path.join(root, m.string) + #print "link: ", buildtarball, commonbuildpath + try: + os.symlink(buildtarball, commonbuildpath) + except OSError, e: + if e.errno == errno.EEXIST: + #print "removing ", commonbuildpath + os.remove(commonbuildpath) + os.symlink(buildtarball, commonbuildpath) + + -- cgit v1.2.1