[wp-hackers] Nightly build generation

Robert Deaton false.hopes at gmail.com
Tue Nov 30 04:31:09 UTC 2004


Kitten's is close, but not perfect, and has one major flaw that
screwed me over once, and that's the rm -rf *, it needs to be rm -rf
/tmp/nightlydir/* instead, as that keeps it from wiping your whole hdd
clean. Try this (tested except the mail/scp part, since i don't have
that stuff set up yet.



#!/bin/sh
# assumes dirs in place, CVS login works, scp working
BUILD_DATE=`date '+%Y-%m-%d'`
cd /tmp/nightlybuilds
rm -rf /tmp/nightlybuilds/*
echo "$BUILD_DATE nightly created" > log
cvs -z3 -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/cafelog co
wordpress >> log
tar -cvvzf wordpress-$BUILD_DATE.tar.gz wordpress/ >> log
zip -r wordpress-$BUILD_DATE wordpress/ >> log
cat log | mail -s "Nightly build status report" matt at example.com
scp wordpress-.* admin at wordpress.org:/nightly/

On Mon, 29 Nov 2004 21:15:17 -0700, Martin <mgonzo at gmail.com> wrote:
> Instead of this:
> cvs -z3 -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/cafelog co
> 
> try
> cvs -z3 -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/cafelog export
> 
> That should leave out the unsightly CVS folders...
> 
> I think someone else mentioned this but im not sure..
> 
> -martin
> 
> On Mon, 29 Nov 2004 23:12:49 -0500, Ryan Duff <ryan at duff-duff.net> wrote:
> 
> 
> > Matthew Mullenweg wrote:
> > > Robert Deaton wrote:
> > > > Why not just have the cron job check a copy out of
> > > anonymous CVS and
> > > > tar/zip it up and move it to the proper directory.
> > >
> > > Yes that's what I'm looking for. Any shell/CVS gurus?
> >
> > This script will copy it down to your machine, tar/zip it and up it back to
> > the nightly server. Theres a few variables you need to change. I've tested
> > it and uploaded it to my ftp site perfectly. I'm not that good with cvs, but
> > I can write a quick and dirty bash script if needed ;)
> >
> > #!/bin/bash
> > # creates a zip and tar.gz file from the wordpress cvs and
> > # uploads it to the nightly directory
> > # Written By Ryan Duff - ryan at duff-duff.net
> > # 11/29/2004
> >
> > # some basic info
> > # ftp username
> > username=your-username
> >
> > # ftp password
> > password=your-password
> >
> > # ftp server
> > server="yoursite.com"
> > directory="/path/to/nightly/"
> >
> > # change to our local directory
> > cd /path/to/local/nightly/;
> >
> > # get the files from the cvs server
> > cvs -z3 -d:pserver:anonymous at cvs.sourceforge.net:/cvsroot/cafelog co
> > wordpress;
> >
> > # remove b2-include and cvs folders
> > rm -Rf ./wordpress/b2-include
> > rm -Rf ./wordpress/CVS
> >
> > # make .zip and .tar.gz to upload
> > zip -r -9 ./wordpress-`date +%Y-%m-%d`.zip wordpress/ ;
> > tar czvf ./wordpress-`date +%Y-%m-%d`.tar.gz wordpress/ ;
> >
> > # upload the files via ftp to nightly server
> > ftp -n $server <<End-Of-Session
> >
> > user $username $password
> > binary
> > cd $directory
> > put wordpress-`date +%Y-%m-%d`.zip
> > put wordpress-`date +%Y-%m-%d`.tar.gz
> > bye
> > End-Of-Session
> >
> > rm -Rf *
> >
> > # end of wordpress nightly batch
> >
> >
> >
> >
> > Ryan Duff
> > http://www.duff-duff.net
> >
> > _______________________________________________
> > hackers mailing list
> > hackers at wordpress.org
> > http://wordpress.org/mailman/listinfo/hackers_wordpress.org
> >
> 
> _______________________________________________
> hackers mailing list
> hackers at wordpress.org
> http://wordpress.org/mailman/listinfo/hackers_wordpress.org
> 


-- 
--Robert Deaton
http://false-hopes.com/
A proud Linux, Firefox, and WordPress user.
Linux is not an operating system, its a way of life.



More information about the hackers mailing list