部署补丁和新版本

发布于 2024-09-03 00:54:54 字数 166 浏览 1 评论 0原文

我正在开发一个大项目,我有 dev 文件夹(连接到特定的子域),然后是“真实”文件夹,即实时文件夹。当我准备好推送补丁或全新版本时,我当前正在单独复制文件,是否有程序可以帮助我完成此任务?

请记住,某些文件(配置文件和 htacess)和文件夹(开发文件)不需要在实时版本中复制。

谢谢

I'm deveoping a big project, I have the dev folder (connected to a specific subdomain) then the "real" folder, the live one. When I'm ready to push patches or whole new versions I'm currently copying the files individually, is there a program that can help me do this task?

Keep in mind that some files (the config one and the htacess) and folders (the dev ones) do not need to be copied in the live version.

Thank you

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

纵性 2024-09-10 00:54:54

是的:Subversion(或任何其他版本控制系统)将允许您轻松地推送更改。

一种简单的解决方案是在您开发和承诺的地方进行一次检查,在部署处进行另一次检查。准备好后,转到部署目录,然后执行 svn up 来同步它。它不会覆盖修改或排除的文件。

Yes: subversion (or any other version control system) will allow you to push changes painlessly.

A simplicistic solution would be to have one checkout where you develop and you commit to, and another checkout which is the deployment. When you are ready, you go to the deployment directory, and do a svn up, to sync it. It won't overwrite modified or excluded files.

奈何桥上唱咆哮 2024-09-10 00:54:54

有一些构建包,例如 CapistranoPhing 可以帮助进行更复杂的部署。 Capistrano 是基于 Ruby 的,因此对于 RoR 应用程序来说它是更自然的选择,而 Phing(基于 PHP)对于基于 PHP 的项目来说可能更方便一些。根据我的经验,Phing 似乎不如 Capistrano 成熟,但更灵活一些,因为它并不假设您正在使用像 Capistrano 那样的 Ruby 项目。当然,这完全是意见。

两者都需要更多的思考和工作来预先配置,但是一旦您设计了部署脚本,您就可以运行单个命令,并在您观看时让一切为您发生。这两个工具都可以与 SVN 等源代码管理集成,并为您从存储库中取出项目的副本。您还可以将部署分解为子部分,就像传统的 Makefile ,这有助于测试和重用。如果您希望发布过程万无一失且一致,则需要使用一个工具来管理涉及的所有步骤,以便消除人为错误组件。

There are build packages like Capistrano and Phing which can help with more complicated deployments. Capistrano is Ruby-based, so it is a more natual choice for RoR applications, and Phing (being PHP-based) can be a little more convenient for PHP-based projects. In my experience, Phing seems less mature than Capistrano, but is a little more flexible because it doesn't assume you are working with a Ruby project like Capistrano seems to do. That's entirely opinion of course.

Both tend to take more thought and work to configure up front, but once you've designed the deploy script, you can run a single command and have everything happen for you while you watch. Both tools can integrate with source control like SVN, and bring copies of your project out of the repository for you. You can also break your deployment out into sub-parts, like a traditional Makefile, which helps with testing and reuse. If you want the process you go through for your releases to be bulletproof and consistent, you need to use a tool that will manage all the steps involved for you so you remove the human-error component.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文