[svlug] In need of CVS/SVN checkout script for Production servers [solved]

Daevid Vincent daevid at daevid.com
Tue May 4 13:08:55 PDT 2010


> -----Original Message-----
> From: svlug-bounces+daevid=daevid.com at lists.svlug.org 
> [mailto:svlug-bounces+daevid=daevid.com at lists.svlug.org] On 
> Behalf Of Daevid Vincent
> Sent: Thursday, April 29, 2010 3:24 PM
> To: 'David Rosenstrauch'; svlug at lists.svlug.org
> Subject: Re: [svlug] In need of CVS/SVN checkout script for 
> Productionservers
> 
> > -----Original Message-----
> > From: svlug-bounces+daevid=daevid.com at lists.svlug.org 
> > [mailto:svlug-bounces+daevid=daevid.com at lists.svlug.org] On 
> > Behalf Of David Rosenstrauch
> > Sent: Thursday, April 29, 2010 12:54 PM
> > To: svlug at lists.svlug.org
> > Subject: Re: [svlug] In need of CVS/SVN checkout script for 
> > Productionservers
> > 
> > On 04/29/2010 03:29 PM, Daevid Vincent wrote:
> > > I'm looking for a script that I would run on my production 
> > web server that
> > > would do this or close to it:
> > >
> > > 	1. do a CVS/SVN checkout to a new timestamped directory
> > 
> > # tweak the date format as needed to add time fields (see: 
> "man date")
> > $ date_format="%Y-%m-%d"
> > $ curr_date=$(date +"$date_format")
> > $ svn co <svn project url> $curr_date
> > 
> > 
> > > 	2. change the symlink from the old directory
> > 
> > $ old_date=$(readlink current)
> > $ ln -sf $curr_date current
> > 
> > 
> > > 	3. change permissions to www-data:www-data on new directory
> > 
> > $ chown www-data:www-data $curr_date
> > 
> > 
> > > 	4. and possibly tarball up the old directory.
> > 
> > $ tar -cvf $old_date.tar.gz old_date
> > 
> > 
> > The above should do it, give or take some syntax errors.
> > 
> > HTH,
> > 
> > DR
> > 
> > 
> > P.S.  Methinks you should invest some time in improving your 
> > command-prompt-fu!  :-)
> 
> David, while I do appreciate your stab at this, I was looking 
> for something
> a bit more battle tested. Yes, I can "whip up" something, and 
> as mentioned,
> I had already written a bash script to do all this and then 
> some. I just
> was trying to avoid spending hours writing something and 
> testing it and all
> that, as there's always some little "gotchas". My old script 
> had some error
> checking and contingencies in case CVS aborted then I wouldn't get a
> half-baked system. I figured someone (actually many people) 
> have already
> done this sort of thing and I could take theirs as a starting 
> point and
> tweek some directory paths and user/group names, etc.
> 
> d

Well, here is the one I'm using. I ended up just writing one (again!)

http://www.daevid.com/content/examples/snippets.php :: "Production
Deployment Script"





More information about the svlug mailing list