【发布时间】:2012-03-06 04:50:42
【问题描述】:
我有一个基于 CodeIgniter 的项目..
我有环境配置文件夹,例如:
/* this does not get pushed to github, it stays on my development workstation */
/application/config/development
/* this is created from example_changeme, when a new client is created. */
/application/config/production
/* this one is used when creating a new client it houses the "template" of production configs */
/application/config/example_changeme
我有一个 github 的核心 repo,其中包括除以下文件夹之外的所有内容:
/application/config/production
/application/config/development
/application/views
/index.php
我有一个包含每个客户端分支的客户端存储库。这些分支有文件夹:
/* this is created from example_changeme */
/application/config/production
/application/views
/index.php
在我的开发工作站上,我的文件夹结构为:
/core/
/client/
ggg/
sgaz/
我需要能够对 core_repo 进行更改,并能够将这些更改下拉到特定分支(或客户端 repo 中的所有分支)。一个示例场景是:
我对以下控制器的代码进行了更改:/application/controllers
目前:我必须将 core_repo 复制/粘贴或重新克隆到每个新站点,并重新创建对我的视图所做的任何更改。
理想情况下:我想简单地使用“更新”的形式从 core_repo 获取更改,但保留应用程序/视图和配置/生产和索引。 php 很灵活。
我该怎么做?
【问题讨论】:
-
我遇到了一个类似的问题,但稍微不那么复杂。我的理解是正确的,您有 3 个位置,我们可以在 3 个不同的“变体”中找到您的项目,每个位置都有自己的配置文件夹?
-
每个
/application/client1文件夹都是其自己的封装应用程序文件夹。尽管控制器/模型/库/助手现在在它们之间都是相同的,但它们可能会有所不同。 CI 支持如上所示的多个应用程序,但只能在 docroot 中为每个应用程序创建一个自定义 index.php 文件。IE:ggg.php、index.php、sgaz.php
标签: php codeigniter github