How to use Rake to manage multiple directory projects?

I have a project consisting of several projects, for example:

my_project \ proj_A \ (code, tests, Rakefile, etc.) proj_B \ (code, tests, Rakefile, etc.) proj_C \ (code, tests, Rakefile, etc.)

I would like to create a Rakefile in the "my_project" section, which can run Rakefile in other projects. For example, to pack the entire application, I need to run the tasks defined in Rakefile in proj_A, proj_B, and then proj_C (in that order).

What is the best way to do this? Is there just a Rakefile that defines the tasks that other Rakefiles call?

+4
source share
1 answer

Create a rake task that depends on all other projects.

import 'projdir1/Rakefile' import 'projdir2/Rakefile' task :finalproject => [:project1, :project2] do # do nothing or maybe some cleanup end 

Tasks: project1 and: project2 will be defined in the external included rakefiles.

Also look at this page for more complex examples. http://rake.rubyforge.org/files/doc/rakefile_rdoc.html

+4
source

Source: https://habr.com/ru/post/1340952/


All Articles