【发布时间】:2009-12-28 22:36:33
【问题描述】:
我有一个应用程序可以在 2 种配置(Company1 或 Company2)中的一种中构建,并且可以处于调试或发布模式。
Company1 Release
All builds done with the Release compiler flag
Build and output core dll files to build directory
Build and output Company1Plugin.dll to build directory
Copy tools\templates\log4net.config to build directory
Copy tools\templates\Company1.MyApp.exe.config to build directory
Company1 Debug
All builds done with the Debug compiler flag
Build and output core dll files to build directory
Build and output Company1Plugin.dll to build directory
Build and output MyApp.Debug.dll to build directory
Copy tools\Growl\log4net.GrowlAppender to build directory
Copy tools\templates\debug.log4net.config to build directory
Copy tools\templates\debug.Company1.MyApp.exe.config to build directory
Company2 Release
All builds done with the Release compiler flag
Build and output core dll files to build directory
Build and output Company2Plugin.dll to build directory
Build and output PrintingUtility.dll to build directory
Copy tools\templates\log4net.config to build directory
Copy tools\templates\Company2.MyApp.exe.config to build directory
Company2 Debug
All builds done with the Debug compiler flag
Build and output core dll files to build directory
Build and output Company2Plugin.dll to build directory
Build and output PrintingUtility.dll to build directory
Build and output MyApp.Debug.dll to build directory
Copy tools\Growl\log4net.GrowlAppender to build directory
Copy tools\templates\debug.log4net.config to build directory
Copy tools\templates\debug.Company2.MyApp.exe.config to build directory
我有点不知如何在我的 rake 文件中最好地建模这个依赖矩阵。 我希望能够简单地做:
rake company1 #(release is the default)
rake company1 release
rake company2 debug
但不能完全弄清楚如何做到这一点。
显然我有一个 build_and_output_core 任务,一切都依赖于它,但那又如何呢?我可以让 company1 和 company2 任务简单地设置一些变量来说明应该做什么,然后是什么触发了实际的复制活动?
我刚刚开始使用 rake 和 ruby,所以任何一般性建议都值得赞赏。
【问题讨论】:
标签: build-process rake