开发者

How to manage project deployments using SVN, Hg or else...?

I have the followin开发者_开发问答g problem,

Whenver I'm working in a solo project, I have a Mercurial repository and whenever I'm going to deploy, I just delete all files in the server and put the whole new project back there, which brings me to the problem, that when the project grows this process gets really unconfortable.

I'm have my machine behind a proxy and a firewall, but what I would like to know is how can I make this process more "automated", like having a Hg repository on the server and doing sync's with the development PC using the development PC's Mercurial client, Can this be done? or Can you suggest a software to handle similar problems?

For the sake of context, I'm using Windows as development PC's OS and the server is a Linux server (not sure of the distro) with Apache2.2 and PHP 5.2.

Thanks in advance,


I do deployment of my personal and small projects (nginx and python) by using a bash script that downloads my latest source control revision, updates a second repo (hg) that the webserver uses as the site location (so I dont have to deal with copying/overwriting and extra files) and restarts the webserver. It is pretty simple but it is working well for me. Instead of all the manual commands updating, copying and restarting I just ./deploy.sh and I am good to go with a nice changeset update email sent by hg.


You could set up a cronjob on the server, that clones the Mercurial repository every 5 minutes or so, and then deletes the .hg folder. Or if you don't mind having the .hg folder around, you could set the repository up once, and then set the cronjob to update it every x minutes.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜