The best way to update site from SVN server without SVN client on live site
We have SVN server on out intranet (192.168.x.x开发者_StackOverflow) 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?
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 :)
Write a build script and use in combination with a Continuous build server like TeamCity
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.
精彩评论