Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

In the super-project, allow adding prerequisites to tasks defined in the sub-project #5

Open
michaeljbishop opened this issue Oct 5, 2014 · 0 comments

Comments

@michaeljbishop
Copy link
Owner

As long as the super-project can reference tasks created in the sub-project, allow the sub-project tasks to have prerequisites attached to them in the super-project Rakefile.

So, to be clear, here are some tasks in in the subproject, located at foo.

task :hello do
  p "HELLO"
end
task :world => :hello do
  p "WORLD"
end
task :cruel do
  p "CRUEL"
end

And here is the super-project:

subproject 'foo'

task 'foo:world' => ['foo:cruel', 'period'] do
  p "AGAIN"
end
task 'period'  do
  p "."
end

Now, when executing the super project:

$ rake foo:world
HELLO
CRUEL
.
WORLD
AGAIN

The sub-project prerequisites are all executed before the super-task prerequisites.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant