tags:

views:

40

answers:

3

Hi there,

We have SVN server on out intranet (192.168.x.x) for me and my fellow developer to develop our site (202.6.x.x). My problem is, my live server doesn't have svn command installed. This live server can't access SVN server as it don't have public IP. What is the best way to deploy our site?

+3  A: 

You could write a simple PHP script to execute on the command-line of your SVN server (or any other server that can run SVN and access your intranet SVN server). This script can ensure a working copy has the latest revision (using svn update), then it can run an svn export to remove all the .svn metadata. You could then FTP/SFTP upload this exported structure to the live server, using curl or any other PHP lib.

You could also get really clever and use a post commit hook on the SVN server to do this automatically for you everytime a new revision is committed :)

Sam Day
hmm.. post commit hook. New to me, I'll google it first. Thanks anyway.
silent
+1  A: 

Write a build script and use in combination with a Continuous build server like TeamCity

ozczecho
A: 

You can use ant and write a script with a target (you can use ant tasks, scp and sshexec) to deliver the package required to your destination server.

Critical Skill