On Nov 13, 6:11*am, "lvaro G. Vicario"
<alvaroNOSPAMTHA...@demogracia.comwrote:
Quote:
Ive been using Subversion for a while to maintain the PHP web apps and
sites I develop in my Windows box. But when I want to publish a new
release I update the live site manually and I want to improve this process.
>
I cant simply export to a fresh directory and upload all files because
that wont handle renames and deletions (and the upload will take
forever anyway). I typically use WinMerge to find out what files changed
but therere some drawbacks:
>
* It cant compare files through FTP (and if it could, I guess itd need
to download the whole site every time) so I need to maintain a local
copy of the live site and upload files manually.
>
* It cant use the repository information so it wont ignore
non-versioned items (settings, uploads, caches, data) unless I maintain
a separate filter duplicating the svn:ignore data.
>
I could keep my current method and write a bunch of Subversion hook
scripts in PHP (Im not proficient in any other language available) to
keep the data in synch but I looks like a overwhelming effort that can
easily break. So I wonder how is everyone else doing it. But according
to my googling the answer is: writing lots of custom scripts!
>
Is it the only way? Is there a tool to help with this common task? Can
Apache Ant be used for this? How do *you* do it?
>
--
--http://alvaro.es- lvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programacin web:
http://bits.demogracia.com
-- Mi web de humor al bao Mara:
http://www.demogracia.com
--
What I've been doing is to determine where the document root is on my
hosting (eg domain.com/html, public_html, whatever) and make that into
a symlink pointing to a different directory where the site lives.
Then when I have an update to do, I export the version I want to
upload, tarball it up, upload it to my hosting, expand it, and then
delete the old symlink and create a new on pointing to the new
directory. If you do both operations at the same time it's very
nearly atomic (eg rm html;ln -s versionNumber.html html).
Occasionally you'll run into a situation that requires you copy some
files from the 'old' directory and overwrite something in the 'new'
directory (such as image files that your users have uploaded,
etc. .htaccess and .htpasswd may also enter into the mix. It stays
largely clean, however.
This generally requires access to the command line of the server, and
not all hosting allows you to SSH into a shared server. (Nexcess.net
does, I'm working with them on a project currently.)
There's more than one way to skin this cat. rsync (if available)
would provide another solution, as well.