基于 kohana 的项目的源代码控制结构

发布于 2024-11-29 02:24:10 字数 1246 浏览 0 评论 0原文

我目前有几个使用 kohana 作为框架的项目,以及我目前拥有的 是这样的目录结构,

project
- application
- system
- modules

“项目”目录处于 Mercurial 源代码控制之下,我基本上复制并粘贴我使用的模块。并将它们投入到每个项目中。

但是我现在发现我修复了模块中的错误,并且没有简单的方法将该修复传播到使用该模块的所有其他项目。

我想要做的是以某种方式链接模块,这样我就可以在需要时轻松获得更新。 (我一直在寻找子存储库来执行此操作)

现在我在 Mercurial 网站上阅读了此内容 “使用 Thin shell 存储库来管理您的子存储库”

https://www.mercurial-scm.org /wiki/Subrepository

所以我现在想出了这个概念

applications
- application1 (hg repo)
- application2 (hg repo)

mymodules
- mymodule1 (hg repo)
- mymodule2 (hg repo)

project  (hg repo)
- application (sub repo pointing to applications/application1)
- modules (several git repos on github, custom modules which are in mymodules/module1 repos)
- system (git repo on github)

website
- project (links to project repo, including application, modules and system)
- assets (images, css, etc)

,我认为这是一个很多结构,而且我对于本质上是一个简单的问题有点过分了。

我也不确定我应该如何做工作。

  1. 在我的网站存储库中并推回项目,这将被推回应用程序,以及模块等

  2. 或者我应该处理应用程序存储库并提升到网站级别?

那么这是构建事物的最佳方式吗?

是否有必要对我使用的所有 github 模块进行本地克隆,以加快速度?

任何帮助表示赞赏

i currently have several projects using kohana as a framework, and what i have at the moment
is a directory structure like this

project
- application
- system
- modules

the "project" dir is under mercurial source control, and i basically copy and paste modules that i use. and commit them to each project.

however i am now finding i fix a bug in a module and there is no easy way to propogate that fix to all the other projects using that module.

what i am wanting to do is link the modules somehow so i can easily get updates when i need them. (i have been looking at subrepos for doing this)

now i read up this on the mercurial site
"Use a thin shell repository to manage your subrepositories"

https://www.mercurial-scm.org/wiki/Subrepository

so i came up with this concept

applications
- application1 (hg repo)
- application2 (hg repo)

mymodules
- mymodule1 (hg repo)
- mymodule2 (hg repo)

project  (hg repo)
- application (sub repo pointing to applications/application1)
- modules (several git repos on github, custom modules which are in mymodules/module1 repos)
- system (git repo on github)

website
- project (links to project repo, including application, modules and system)
- assets (images, css, etc)

now i am thinking that is a lot of structure and i am going a bit over the top for what is essentially a simple problem.

Also I am not sure how i should i be doing work.

  1. in my the website repos and pushing back to project, which would get pushed back to the application, and modules etc

  2. or should i be working on the application repos and pushing up to the website level?

So is this the best way to structure things?

also is it necessary to have a local clone of all the github modules i use, to speed things up?

any help appreciated

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

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

发布评论

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

评论(1

夜还是长夜 2024-12-06 02:24:10

子存储库解决方案是一个很好的解决方案,因为它允许分离:

  • 开发结构(由所有存储库组成)
  • 部署结构(即程序所需的结构)编译并运行,或者让您的网站正确显示)

如何使其发挥作用意味着您如何组织您的发布管理流程。
您应该从存储库进行修改,然后将它们传播到部署结构(通过项目内的更新,然后更新网站内的项目)。

The subrepos solution is a good one, as it allows to separate:

  • the development structure (composed of all your repos)
  • the deployment structure (i.e. the structure you need for your program to compile and run, or to your website to be displayed properly)

How to make it works means how you organize your release management process.
You should make modifications from your repos, and then propagate them to the deployment structures (through updates within projects, and then update of project within website).

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