[PD-cvs] SF.net SVN: pure-data:[10590] trunk/scripts/auto-build

eighthave at users.sourceforge.net eighthave at users.sourceforge.net
Thu Jan 22 00:11:38 CET 2009


Revision: 10590
          http://pure-data.svn.sourceforge.net/pure-data/?rev=10590&view=rev
Author:   eighthave
Date:     2009-01-21 23:11:38 +0000 (Wed, 21 Jan 2009)

Log Message:
-----------
- 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

Modified Paths:
--------------
    trunk/scripts/auto-build/prep-auto-build-upload

Added Paths:
-----------
    trunk/scripts/auto-build/create-latest-build-listing.py

Added: trunk/scripts/auto-build/create-latest-build-listing.py
===================================================================
--- trunk/scripts/auto-build/create-latest-build-listing.py	                        (rev 0)
+++ trunk/scripts/auto-build/create-latest-build-listing.py	2009-01-21 23:11:38 UTC (rev 10590)
@@ -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)
+
+                                        


Property changes on: trunk/scripts/auto-build/create-latest-build-listing.py
___________________________________________________________________
Added: svn:executable
   + *

Modified: trunk/scripts/auto-build/prep-auto-build-upload
===================================================================
--- trunk/scripts/auto-build/prep-auto-build-upload	2009-01-21 22:01:21 UTC (rev 10589)
+++ trunk/scripts/auto-build/prep-auto-build-upload	2009-01-21 23:11:38 UTC (rev 10590)
@@ -2,11 +2,11 @@
 
 # prepare a directory per date for the auto-builders to upload to
 
-HOSTNAME=$(hostname)
-SYSTEM=$(uname -s)
-DATE=$(date +%Y-%m-%d)
-TIME=$(date +%H.%M.%S)
-SCRIPT=$(echo $0| sed 's|.*/\(.*\)|\1|g')
+HOSTNAME=`hostname`
+SYSTEM=`uname -s`
+DATE=`date +%Y-%m-%d`
+TIME=`date +%H.%M.%S`
+SCRIPT=`echo $0| sed 's|.*/\(.*\)|\1|g'`
 LOGFILE=/home/pd/logs/${DATE}_${TIME}_-_${SCRIPT}_-_${SYSTEM}.txt
 
 #BUILD_ROOT="/var/www/auto-build"
@@ -20,10 +20,7 @@
 	 mkdir "${TODAYS_ROOT}"                    >> $LOGFILE 2>&1
 	 mkdir "${TODAYS_ROOT}/logs"               >> $LOGFILE 2>&1
 	 chown -R nobody.nogroup "${TODAYS_ROOT}"  >> $LOGFILE 2>&1
-	 
-	 rm -f -- ${BUILD_ROOT}/latest             >> $LOGFILE 2>&1
-	 ln -s ${TODAYS_ROOT} ${BUILD_ROOT}/latest >> $LOGFILE 2>&1
-	 
+
 	 chown -R ${PROJECT}.${PROJECT} /home/${PROJECT}/  >> $LOGFILE 2>&1
 	 chmod -R u+rw /home/${PROJECT}/                   >> $LOGFILE 2>&1
 }


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Pd-cvs mailing list