多文件 rake 构建
我有一个构建系统,由几个带有项目的子目录组成,其中每个子目录都有一个单独的 rakiefile(或几个 rakefile)。顶级目录有一个 rakefile,它遍历所有子目录并通过 system("rake ") 调用 rake,获取生成的包并将它们发送到适当的机器。有更优雅的方法吗?我已经尝试过 Rake.application.load() 但这似乎不接受任何关于必须加载哪个文件的参数(正如我提到的有时每个子目录中有 2 个 rakefiles),
I have a build system that consists of several subdirectories with projects, where in each of them there's a separate rakiefile (or couple of rakefiles). No the top-level directory has a rakefile that goes through all subdirectories and calls rake via: system("rake "), gets resulting packages and sends them to appropriate machine. Is there more elegant way of doing this? I've tried Rake.application.load() but this doesn't seem to accept any argument as to which file must be loaded (as I've mentioned sometimes there are 2 rakefiles in each subdirectory),
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好的,我有基于 knoopx 所说的解决方案。这是我的主文件:
子目录中的每个 rakefile 必须包含默认任务的定义。
Ok, I have solution that is based on what knoopx said. Here is my master file:
Each rakefile in subdirectory must contain definition of default task.
只需在您的大项目的根目录下创建一个新的Rakefile并动态加载您的子项目Rakefiles
Just create a new Rakefile at the root of your big project and dynamically load your sub-project Rakefiles