Calling the rake attachment from the root directory

How can I run a rake file for a nested project from the root directory? (2 cases: from the console and from the rake root file). Suppose I cannot modify the rake file attachment and that it must have "libs / someproject" as the working directory.

Here is my project structure:

-root
 --rakefile.rb
 --libs
 --- someproject
 ---- rakefile.rb

+5
source share
1 answer

Ok, this is my current solution:

task :build_someproject do
  Dir.chdir 'libs/someproject' do
    system 'rake build'
  end
end
+2
source

All Articles