Using Subversion Tags to Deploy to Development/Staging/Testing Server

家住魔仙堡 提交于 2019-12-22 13:58:10

问题


Are Subversion Tags a good way to post to a development or staging server?

I envision this.

As the trunk becomes stable, a tag is created with that build. The development server switches to that tag utilizing Subversion, updating to the latest revision of files, deleting no longer needed files, etc. The server account I envision would also only have read only access to the repository.

Does this make sense? I am thinking of a way I can eliminate manual hand-copying files up to the development/staging/testing server.

Note: I am not using a build server so I don't need any hooks. Also, this is a Windows box.


回答1:


Subversion does not have real tags the way CVS does (http://svnbook.red-bean.com/en/1.1/ch04s06.html). However, you can tag using 'svn copy' which really makes a branch. Nonetheless, it is a best practice to release live (Deploy) from a version control system. You can get pretty fancy with stuff like Automated Deployment http://imrannazar.com/Automated-Deployment-with-Subversion.

One thing I would recommend is that you do a clean checkout of the code somewhere else first before doing a release to live. This way you will make sure everything is working and that everything got checked in.

My other recommendation is that you use 'svn export' instead of checkout. That way it removed all .svn directories and anything else not needed.




回答2:


Sure, it's a great idea. Check out Capistrano, it's a popular deployment tool that does basically what you have described. It's used primarily with Ruby on Rails, but it can be used in other environments.



来源:https://stackoverflow.com/questions/2181667/using-subversion-tags-to-deploy-to-development-staging-testing-server

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!