fix daily builds

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43614 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Chris Elliott
2006-11-23 13:30:36 +00:00
parent eeb552d0d5
commit 7e94d4475c

View File

@@ -2,6 +2,7 @@
CURDATE=`date -I` CURDATE=`date -I`
WORKDIR=/home/bake/bkl-cronjob WORKDIR=/home/bake/bkl-cronjob
WINSRCDIR=/mnt/daily
FTPDIR=/home/ftp/pub FTPDIR=/home/ftp/pub
LD_LIBRARY_PATH=/usr/local/lib LD_LIBRARY_PATH=/usr/local/lib
@@ -10,9 +11,7 @@ update_from_cvs()
( (
cd ${WORKDIR}/wxWidgets && cvs -z3 update -P -d cd ${WORKDIR}/wxWidgets && cvs -z3 update -P -d
) )
(
cd ${WORKDIR}/wxGTK && cvs -z3 update -P
)
} }
@@ -46,19 +45,14 @@ do_package()
cd .. cd ..
} }
package_cvs()
{
rm -f ${WORKDIR}/archives/wx-cvs-$1*
cd ${WORKDIR}/
##tar --exclude=*.ds* -jcf ./archives/test.tar.bz2 ./wxGTK
tar --exclude=*.ds* -jcf ./archives/wx-cvs-$1-${CURDATE}.tar.bz2 ./$2
}
package_makefiles() package_makefiles()
{ {
do_package tar autoconf Makefile.in autoconf_inc.m4 do_package tar autoconf Makefile.in autoconf_inc.m4
do_package zip borland makefile.bcc config.bcc do_package zip gnu makefile.unx
do_package tar gnu makefile.unx
do_package zip mingw makefile.gcc config.gcc do_package zip mingw makefile.gcc config.gcc
do_package zip dmars makefile.dmc config.dmc makefile.dms config.dms do_package zip dmars makefile.dmc config.dmc makefile.dms config.dms
do_package zip watcom makefile.wat config.wat do_package zip watcom makefile.wat config.wat
@@ -70,24 +64,12 @@ package_makefiles()
copy_files () copy_files ()
{ {
##delete old files and then copy new ones, add a symlink ##delete old files and then copy new ones, add a symlink
## CVS
find ${FTPDIR}/CVS_HEAD/files -type f -name wx-cvs\* -mtime +6 | xargs rm -rf
cp ${WORKDIR}/archives/wx-cvs-* ${FTPDIR}/CVS_HEAD/files
rm ${FTPDIR}/CVS_HEAD/wx* ${FTPDIR}/CVS_HEAD/MD5SUM
for f in `find ${FTPDIR}/CVS_HEAD/files -type f -name wx-cvs\* -mmin -601` ; do
ln -s $f `echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||" `
done
md5sum ${FTPDIR}/CVS_HEAD/wx* > ${FTPDIR}/CVS_HEAD/MD5SUM
## make sure updated at is really last
sleep 10
echo cvs checkout done at `date -u` > ${FTPDIR}/CVS_HEAD/updated_at.txt
## Makefiles ## Makefiles
find ${FTPDIR}/CVS_Makefiles/files -type f -name wx-mk\* -mtime +3 | xargs rm -rf find ${FTPDIR}/CVS_Makefiles/files -type f -name wx-mk\* -mtime +3 | xargs rm -rf
cp ${WORKDIR}/archives/wx-mk-* ${FTPDIR}/CVS_Makefiles/files cp ${WORKDIR}/archives/wx-mk-* ${FTPDIR}/CVS_Makefiles/files
rm ${FTPDIR}/CVS_Makefiles/wx* ${FTPDIR}/CVS_Makefiles/MD5SUM rm -f ${FTPDIR}/CVS_Makefiles/wx* ${FTPDIR}/CVS_Makefiles/MD5SUM
##there must be an easier way of doing these links... ##there must be an easier way of doing these links...
for f in `find ${FTPDIR}/CVS_Makefiles/files -type f -name wx-mk\* -mmin -601` ; do for f in `find ${FTPDIR}/CVS_Makefiles/files -type f -name wx-mk\* -mmin -601` ; do
ln -s $f `echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||" ` ln -s $f `echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||" `
@@ -96,14 +78,28 @@ md5sum ${FTPDIR}/CVS_Makefiles/wx* > ${FTPDIR}/CVS_Makefiles/MD5SUM
sleep 10 sleep 10
echo CVS Makefiles generated from bakefiles last updated at `date -u` > ${FTPDIR}/CVS_Makefiles/updated_at.txt echo CVS Makefiles generated from bakefiles last updated at `date -u` > ${FTPDIR}/CVS_Makefiles/updated_at.txt
## Setup.exe
find ${FTPDIR}/CVS_HEAD/v1/files -type f -name wx\* -mtime +3 | xargs rm -rf
cp ${WORKDIR}/archives/win/*.exe ${FTPDIR}/CVS_HEAD/v1/files
rm -f ${FTPDIR}/CVS_HEAD/v1/*.exe ${FTPDIR}/CVS_Makefiles/MD5SUM
##there must be an easier way of doing these links...
for f in `find ${FTPDIR}/CVS_HEAD/v1/files -type f -name wx\*.exe -mmin -601` ; do
ln -s $f `echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||" `
done
md5sum ${FTPDIR}/CVS_HEAD/v1/wx* > ${FTPDIR}/CVS_Makefiles/MD5SUM
sleep 10
echo CVS HEAD last updated at `date -u` > ${FTPDIR}/CVS_HEAD/v1/updated_at.txt
## Docs... ## Docs...
find ${FTPDIR}/CVS_Docs/files -type f -name wxWidgets-Do\* -mtime +3 | xargs rm -rf find ${FTPDIR}/CVS_Docs/files -type f -name wx\* -mtime +3 | xargs rm -rf
cp ${WORKDIR}/archives/wxWidgets-Docs-* ${FTPDIR}/CVS_Docs/files cp ${WORKDIR}/archives/wx-doc* ${FTPDIR}/CVS_Docs/files
cp ${WORKDIR}/archives/win/wxW* ${FTPDIR}/CVS_Docs/files
rm ${FTPDIR}/CVS_Docs/wx* ${FTPDIR}/CVS_Docs/MD5SUM rm -f ${FTPDIR}/CVS_Docs/wx* ${FTPDIR}/CVS_Docs/MD5SUM
##there must be an easier way of doing these links... ##there must be an easier way of doing these links...
for f in `find ${FTPDIR}/CVS_Docs/files -type f -name wxWidgets-Do\* -mmin -601` ; do for f in `find ${FTPDIR}/CVS_Docs/files -type f -name wx\* -mmin -601` ; do
ln -s $f `echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||" ` ln -s $f `echo $f | sed -e "s/-${CURDATE}//" | sed -e "s|/files||" `
done done
md5sum ${FTPDIR}/CVS_Docs/wx* > ${FTPDIR}/CVS_Docs/MD5SUM md5sum ${FTPDIR}/CVS_Docs/wx* > ${FTPDIR}/CVS_Docs/MD5SUM
@@ -115,7 +111,12 @@ do_texrtf ()
{ {
##parameters : subdir_of_tex index.tex dir_under_wxWidgets ##parameters : subdir_of_tex index.tex dir_under_wxWidgets
rm ${WORKDIR}/archives/html/$1/* # need this first time only
if [ ! -e ${WORKDIR}/archives/html/$1 ] ; then
mkdir ${WORKDIR}/archives/html/$1
fi
rm -f ${WORKDIR}/archives/html/$1/*
/usr/local/bin/tex2rtf ${WORKDIR}/wxWidgets/$3/docs/latex/$1/$2 ${WORKDIR}/archives/html/$1/$1 -twice -html -macros ${WORKDIR}/wxWidgets/docs/latex/wx/tex2rtf_css.ini /usr/local/bin/tex2rtf ${WORKDIR}/wxWidgets/$3/docs/latex/$1/$2 ${WORKDIR}/archives/html/$1/$1 -twice -html -macros ${WORKDIR}/wxWidgets/docs/latex/wx/tex2rtf_css.ini
cp ${WORKDIR}/wxWidgets/$3/docs/latex/$1/*.gif ${WORKDIR}/archives/html/$1 cp ${WORKDIR}/wxWidgets/$3/docs/latex/$1/*.gif ${WORKDIR}/archives/html/$1
cp ${WORKDIR}/wxWidgets/$3/docs/latex/$1/*.css ${WORKDIR}/archives/html/$1 cp ${WORKDIR}/wxWidgets/$3/docs/latex/$1/*.css ${WORKDIR}/archives/html/$1
@@ -128,7 +129,12 @@ zip -q -9 ${WORKDIR}/archives/htb/$1.htb *.gif
do_util_texrtf () do_util_texrtf ()
{ {
##parameters : subdir_of_tex index.tex ##parameters : subdir_of_tex index.tex
rm ${WORKDIR}/archives/html/$1/* # need this first time only
if [ ! -e ${WORKDIR}/archives/html/$1 ] ; then
mkdir ${WORKDIR}/archives/html/$1
fi
rm -f ${WORKDIR}/archives/html/$1/*
/usr/local/bin/tex2rtf ${WORKDIR}/wxWidgets/utils/$1/docs/$2 ${WORKDIR}/archives/html/$1/$1 -twice -html -macros ${WORKDIR}/wxWidgets/docs/latex/wx/tex2rtf_css.ini /usr/local/bin/tex2rtf ${WORKDIR}/wxWidgets/utils/$1/docs/$2 ${WORKDIR}/archives/html/$1/$1 -twice -html -macros ${WORKDIR}/wxWidgets/docs/latex/wx/tex2rtf_css.ini
cp ${WORKDIR}/wxWidgets/utils/$1/docs/*.gif ${WORKDIR}/archives/html/$1 cp ${WORKDIR}/wxWidgets/utils/$1/docs/*.gif ${WORKDIR}/archives/html/$1
cp ${WORKDIR}/wxWidgets/utils/$1/docs/*.css ${WORKDIR}/archives/html/$1 cp ${WORKDIR}/wxWidgets/utils/$1/docs/*.css ${WORKDIR}/archives/html/$1
@@ -140,7 +146,8 @@ zip -q -9 ${WORKDIR}/archives/htb/$1.htb *.gif
do_docs () do_docs ()
{ {
##remove files, then regenerate ##remove files, then regenerate
rm ${WORKDIR}/archives/wxWidgets-Docs* rm ${WORKDIR}/archives/wx-do*
rm ${WORKDIR}/archives/win/wx*
rm ${WORKDIR}/archives/htb/*.* rm ${WORKDIR}/archives/htb/*.*
######### dir index.tex rootdir ######### dir index.tex rootdir
@@ -154,13 +161,12 @@ do_texrtf fl fl.tex contrib
do_util_texrtf tex2rtf tex2rtf.tex do_util_texrtf tex2rtf tex2rtf.tex
cd ${WORKDIR}/archives/ cd ${WORKDIR}/archives/
tar zcvf ${WORKDIR}/archives/wxWidgets-Docs-HTML-${CURDATE}.tar.gz html/wx/*.html html/wx/*.gif html/wx/*.css tar zcvf ${WORKDIR}/archives/wx-docs-html-${CURDATE}.tar.gz html/wx/*.html html/wx/*.gif html/wx/*.css
# TODO: include the extra HTML docs into the above archive. tar zcvf ${WORKDIR}/archives/wx-docs-extra-html-${CURDATE}.tar.gz `find . -name 'wx' -prune -o -name '*.html' -print`
# TODO: we need to add the version number to the doc archives
# tar zcvf ${WORKDIR}/archives/wxWidgets-Docs-Extra-HTML-${CURDATE}.tar.gz `find . -name 'wx' -prune -o -name '*.html' -print`
tar zcvf ${WORKDIR}/archives/wxWidgets-Docs-HTB-${CURDATE}.tar.gz htb/*.htb tar zcvf ${WORKDIR}/archives/wx-docs-htb-${CURDATE}.tar.gz htb/wx.htb
# tar zcvf ${WORKDIR}/archives/wxWidgets-Docs-Extra-HTB-${CURDATE}.tar.gz --exclude wx.htb htb/*.htb tar zcvf ${WORKDIR}/archives/wx-docs-extra-htb-${CURDATE}.tar.gz --exclude wx.htb htb/*.htb
zip -q -9 ${WORKDIR}/archives/wx-docs-htb-${CURDATE}.zip htb/wx.htb
##remove .con files ##remove .con files
rm ${WORKDIR}/*.con rm ${WORKDIR}/*.con
@@ -170,14 +176,14 @@ rm ${WORKDIR}/*.con
add_win_files () add_win_files ()
{ {
### starts with wxWidgets-Docs-xxx.zip ### starts with wx***.zip
for f in `find ${WORKDIR}/archives/win/ -name wx\*.zip ` ; do
mv $f ${WORKDIR}/archives/`basename $f | tr -d ".zip"`-${CURDATE}.zip for f in `find ${WINSRCDIR}/ -name wx\*.zip ` ; do
cp $f ${WORKDIR}/archives/win/`basename $f | sed -e "s/.zip//"`-${CURDATE}.zip
done done
rm ${WORKDIR}/archives/*.exe for f in `find ${WINSRCDIR}/ -name wx\*.exe ` ; do
for f in `find ${WORKDIR}/archives/win/ -name wx\*.exe ` ; do cp $f ${WORKDIR}/archives/win/`basename $f | sed -e "s/.exe//"`-${CURDATE}.exe
mv $f ${WORKDIR}/archives/`basename $f | tr -d ".exe"`-${CURDATE}.exe
done done
} }
@@ -185,8 +191,6 @@ for f in `find ${WORKDIR}/archives/win/ -name wx\*.exe ` ; do
update_from_cvs update_from_cvs
regenerate_makefiles regenerate_makefiles
package_makefiles package_makefiles
package_cvs All wxWidgets
package_cvs Gtk wxGTK
do_docs do_docs
add_win_files add_win_files