The way we achieve this is through the post-commit hook.
Our instance its in:
/svn/reponame/hooks/
=== Contents of post-commit ===
#!/bin/bash
/usr/bin/svn update /var/www/domains/example.com/www/trunk
===========================
Notice the full path to SVN and the full path to where it's being
checked out.
It's important that the permissions are set to be able to execute the
file.
On Oct 23, 2008, at 11:05 AM, Ray wrote:
> You can do this server-side with post-commit hooks (I've never done
> that), or you can have your web folder be a working copy of the repo
> (I do this for every site I can), then you just have to run an
> update on the webserver. You need shell access to the svn repo
> server or the webserver to do these things though. You also have to
> make sure you can restrict access from the .svn directories.
>
> I have a php script that looks like:
> #update.php
> <?php
> ob_end_clean();
> ob_start();
> passthru("svn up");
> $up = ob_get_contents();
> ob_end_clean();
> ob_start();
> passthru("svn st");
> $st = ob_get_contents();
> ob_end_clean();
> $content = "<h2>Update:</h2><pre>$up</pre><h2>Status:</h2><pre>$st</
> pre>";
> ?>
> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
> <head>
> <title>Update</title>
> <meta http-equiv="Content-Type" content="text/html;
> charset=utf-8" />
> <link rel="stylesheet" type="text/css" href="/css/styles.css" />
> </head>
> <body>
> <?php echo $content;?>
> </body>
> </html>
>
> I can run it by visiting mysite.com/update.php It doesn't take any
> input from the web, so it's not a problem for security.
>
> On Wed, Oct 22, 2008 at 10:04 AM, Dan Course <[EMAIL PROTECTED]>
> wrote:
>
> Is there a way in Versions that after I've committed a file to the SVN
> repository I can just upload the changed file to our live server?
>
> I'm going crazy having to either upload 2 files in deep folders OR the
> whole site for each small change.
>
> Thanks!
>
> DanC
>
>
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Versions" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/versions?hl=en
-~----------~----~----~----~------~----~------~--~---