Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I use subversion in such a way that "commit" automatically updates my server files?

Tags:

php

eclipse

svn

I would like to know if there is any way to make it so that when I commit changes using Subversion, that the changes are automatically reflected on my server in the testing folder? Perhaps this idea is irrational. I'm struggling to get a good big-picture view here. If I kept the subversion repository on the server, would that be reasonable?

like image 435
Joshua Avatar asked Dec 18 '22 03:12

Joshua


1 Answers

You could set something up as simple as a cron job to check for changes every minute or so.

However in my experience, I've found it more flexible to set up a continuous integration / build server like TeamCity or Hudson with a job that checks the svn repository every minute or so for updates. If there are updates you can "deploy" them to the testing directory. The advantage of going this route is that you could automate additional tasks such as restarting the web server and/or running unit tests and only updating on success, etc.

Also, it is not entirely necessary for the subversion server to be on the same server as your environment that needs updating.

like image 120
jamesaharvey Avatar answered Jan 30 '23 08:01

jamesaharvey