开发者

Call nested rake file from the root directory

开发者 https://www.devze.com 2022-12-25 12:17 出处:网络
How can I run rake file for a nested project from the root directory? (2 cases: from console and from the root rakefile). Assume that I cannot mo开发者_如何学Cdify the nested rakefile and that it must

How can I run rake file for a nested project from the root directory? (2 cases: from console and from the root rakefile). Assume that I cannot mo开发者_如何学Cdify the nested rakefile and that it must have 'libs/someproject' as the working directory.

Here is my project structure:

-root

--rakefile.rb

--libs

---someproject

----rakefile.rb


well, this is my current solution:

task :build_someproject do
  Dir.chdir 'libs/someproject' do
    system 'rake build'
  end
end
0

精彩评论

暂无评论...
验证码 换一张
取 消