Update of /cvsroot/pure-data/scripts/auto-build In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31889/auto-build
Modified Files: prep-auto-build-upload pure-data-cvs-rsync-checkout run-automated-builder Added Files: pd-extended-auto-builder.sh Log Message: extended auto-builds to allow for building multiple distros, and included a pd-MAIN distro, which seems to work. We'll see...
Index: prep-auto-build-upload =================================================================== RCS file: /cvsroot/pure-data/scripts/auto-build/prep-auto-build-upload,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** prep-auto-build-upload 31 Jul 2006 04:42:45 -0000 1.1 --- prep-auto-build-upload 3 Aug 2006 05:54:03 -0000 1.2 *************** *** 3,14 **** # prepare a directory per date for the auto-builders to upload to
DATE=`date +%Y-%m-%d` TIME=`date +%H.%M.%S`
BUILD_ROOT="/var/www/auto-build" TODAYS_ROOT="${BUILD_ROOT}/${DATE}"
! chown -R root.root "${BUILD_ROOT}" ! mkdir "${TODAYS_ROOT}" ! chown nobody.nogroup "${TODAYS_ROOT}"
--- 3,20 ---- # 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'` + LOGFILE=/home/pd/logs/${DATE}_-_${TIME}_-_${SCRIPT}_-_${SYSTEM}.txt
BUILD_ROOT="/var/www/auto-build" TODAYS_ROOT="${BUILD_ROOT}/${DATE}"
! chown -R root.root "${BUILD_ROOT}" >> $LOGFILE 2>&1 ! mkdir "${TODAYS_ROOT}" >> $LOGFILE 2>&1 ! chown nobody.nogroup "${TODAYS_ROOT}" >> $LOGFILE 2>&1
+ chown -R pd /home/pd >> $LOGFILE 2>&1 + chmod -R u+rw /home/pd >> $LOGFILE 2>&1
Index: pure-data-cvs-rsync-checkout =================================================================== RCS file: /cvsroot/pure-data/scripts/auto-build/pure-data-cvs-rsync-checkout,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pure-data-cvs-rsync-checkout 3 Aug 2006 05:13:37 -0000 1.2 --- pure-data-cvs-rsync-checkout 3 Aug 2006 05:54:03 -0000 1.3 *************** *** 9,15 **** touch $LOGFILE
- chown -R pd /home/pd/ >> $LOGFILE 2>&1 - chmod -R u+rw /home/pd/ >> $LOGFILE 2>&1 - # extended echo "------------------------------------------------------------" >> $LOGFILE 2>&1 --- 9,12 ----
--- NEW FILE: pd-extended-auto-builder.sh --- #!/bin/sh
# this script is the first attempt to have an automated updater and builder
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
function upload_build () { platform_folder=$1 archive_format=$2
# upload files to webpage test -e /home/pd/auto-build/packages/${platform_folder}/build/Pd*.${archive_format} && \ rsync -a /home/pd/auto-build/packages/${platform_folder}/build/Pd*.${archive_format} \ rsync://128.238.56.50/upload/${DATE}/`ls -1 /home/pd/auto-build/packages/*/build/Pd*.${archive_format} | sed "s|.*/(.*)${archive_format}|\1${HOSTNAME}.${archive_format}|"` }
# convert into absolute path cd `echo $0 | sed 's|(.*)/.*$|\1|'`/../.. auto_build_root_dir=`pwd`
echo "root: $auto_build_root_dir"
# let rsync handle the cleanup with --delete rsync -av --delete rsync://128.238.56.50/pure-data/ ${auto_build_root_dir}/
BUILD_DIR=. if [ "$SYSTEM" == "Linux" ]; then BUILD_DIR=linux_make fi if [ "$SYSTEM" == "Darwin" ]; then BUILD_DIR=darwin_app fi if [ "`echo $SYSTEM | sed -n 's|(MINGW)|\1|p'`" == "MINGW" ]; then BUILD_DIR=win32_inno fi
cd "${auto_build_root_dir}/packages/$BUILD_DIR" make -C "${auto_build_root_dir}/packages" patch_pd make install && make package
make test_package make test_locations
case $SYSTEM in Linux) upload_build linux_make tar.bz2 >> $LOGFILE 2>&1 ;; Darwin) upload_build darwin_app dmg >> $LOGFILE 2>&1 ;; MINGW*) upload_build win32_inno exe >> $LOGFILE 2>&1 ;; *) echo "ERROR: Platform $SYSTEM not supported!" >> $LOGFILE 2>&1 exit ;; esac
Index: run-automated-builder =================================================================== RCS file: /cvsroot/pure-data/scripts/auto-build/run-automated-builder,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** run-automated-builder 2 Aug 2006 17:42:32 -0000 1.2 --- run-automated-builder 3 Aug 2006 05:54:03 -0000 1.3 *************** *** 6,50 **** TIME=`date +%H.%M.%S` SCRIPT=`echo $0| sed 's|.*/(.*)|\1|g'` - LOGFILE=/home/pd/logs/${DATE}_-_${TIME}_-_${SCRIPT}_-_${SYSTEM}.txt
! function upload_build () { ! platform_folder=$1 ! archive_format=$2 ! ! # upload files to webpage ! test -e /home/pd/auto-build/packages/${platform_folder}/build/Pd*.${archive_format} && \ ! rsync -a /home/pd/auto-build/packages/${platform_folder}/build/Pd*.${archive_format} \ ! rsync://128.238.56.50/upload/${DATE}/`ls -1 /home/pd/auto-build/packages/*/build/Pd*.${archive_format} | sed "s|.*/(.*)${archive_format}|\1${HOSTNAME}.${archive_format}|"` ! } ! ! ! touch ${LOGFILE} ! ! chown -R pd /home/pd/auto-build >> $LOGFILE 2>&1 ! chmod -R u+rw /home/pd/auto-build >> $LOGFILE 2>&1
! su - pd -c /home/pd/auto-build/scripts/automated-builder.sh >> $LOGFILE 2>&1
! case $SYSTEM in ! Linux) ! upload_build linux_make tar.bz2 >> $LOGFILE 2>&1 ! ;; ! Darwin) ! upload_build darwin_app dmg >> $LOGFILE 2>&1 ! ;; ! MINGW*) ! upload_build win32_inno exe >> $LOGFILE 2>&1 ! ;; ! *) ! echo "ERROR: Platform $SYSTEM not supported!" >> $LOGFILE 2>&1 ! exit ! ;; ! esac
# send status report ! SUBJECT="$HOSTNAME Pd-$SYSTEM build results $DATE $TIME" ! tail -200 ${LOGFILE} | mail -s "${SUBJECT}" hans@eds.org
--- 6,28 ---- TIME=`date +%H.%M.%S` SCRIPT=`echo $0| sed 's|.*/(.*)|\1|g'`
! run_build_script () { ! distro=$1
! LOGFILE=/home/pd/logs/${DATE}_-_${TIME}_-_${SCRIPT}_-_${distro}_-_${SYSTEM}.txt ! touch ${LOGFILE}
! su - pd -c /home/pd/auto-build/scripts/auto-build/${distro}-auto-builder.sh \ ! >> $LOGFILE 2>&1
# send status report ! SUBJECT="$HOSTNAME Pd-$SYSTEM $distro build results $DATE $TIME" ! tail -200 ${LOGFILE} | mail -s "${SUBJECT}" hans@eds.org ! }
+ run_build_script pd-main + run_build_script pd-extended + run_build_script pd-devel