生产环境的SVN结帐或导出? [英] SVN checkout or export for production environment?

查看:22
本文介绍了生产环境的SVN结帐或导出?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我正在进行的一个项目中,我们在开发团队之间进行了持续的讨论 - 应该将生产环境部署为从 SVN 存储库签出还是作为导出?

In a project I am working on, we have an ongoing discussion amongst the dev team - should the production environment be deployed as a checkout from the SVN repository or as an export?

开发环境显然是一个结帐,因为它不断更新.对于生产,我个人倾向于检查主干,因为它使将来的更新更容易(只需运行 svn update).然而,一些开发人员反对它,因为 svn 创建具有组/所有者和 svn 进程权限的文件(这是在 linux 操作系统上,所以这些事情很重要),并且在生产中也有 .svn 目录似乎它们有点脏.

The development environment is obviously a checkout, since it is constantly updated. For the production, I'm personally for checking out the main trunk, since it makes future updates easier (just run svn update). However some of the devs are against it, as svn creates files with the group/owner and permissions of the svn process (this is on a linux OS, so those things matter), and also having the .svn directories on the production seem to them to be somewhat dirty.

此外,如果是结帐 - 您如何在不包含开发中代码的情况下将单个功能推送到生产中?您是否为每个功能使用标签或分支?有什么替代品吗?

Also, if it is a checkout - how do you push individual features to the production without including in-development code? do you use tags or branch out for each feature? any alternatives?

我可能不清楚 - 要求之一是能够不断地将修复推送到生产环境.我们希望避免仅仅为了推送关键修复而进行完整的构建(这比简单的更新花费的时间要长得多).

I might not have been clear - one of the requirement is to be able to constantly be able to push fixes to the production environment. We want to avoid a complete build (which takes much longer than a simple update) just for pushing critical fixes.

推荐答案

The SubversionFAQ 似乎提倡部署为检出,使用提交后钩子脚本自动更新.他们通过在 httpd.conf 中添加以下内容来阻止 Apache 导出 .svn 文件夹(可能是个好主意):

The Subversion FAQ seems to advocate deployment as a checkout, autoupdated with post-commit hook scripts. They prevent Apache from exporting .svn folders (probably a good idea) by adding the following in httpd.conf:

# Disallow browsing of Subversion working copy administrative dirs.
<DirectoryMatch "^/.*/.svn/">
    Order deny,allow
    Deny from all
</DirectoryMatch>

我自己对 svn 非常陌生,但也许您可以在创建新标签时触发钩子脚本.这样,当您准备好更新实时站点时,您只需将上次更改提交到主干,创建新标签,脚本就会使用 svn update 更新您的实时站点.

I'm extremely new to svn myself, but maybe you could trigger a hook script when you create a new tag. That way, when you're ready to update the live site, you just commit your last changes to the trunk, create the new tag, and the script updates your live site with svn update.

这篇关于生产环境的SVN结帐或导出?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆