Is it possible to use shorthand for multiple tasks in same namespace in task requirements?

StackOverflow https://stackoverflow.com/questions/15116666

  •  15-03-2022
  •  | 
  •  

Domanda

Here is an example Rakefile

namespace :install do
   task :baz do
       ...
   end

   task :quux do
       ...
   end
end

task :foo => ['bar:baz','bar:quux'] do
    ...
end

Is it possible to write something like task :foo => ['bar' => ['baz', 'quux']] do

È stato utile?

Soluzione

This can't be done. I've just dug around in the source and if you must: checkout resolve_args_with_dependencies. In there you need to do horrible things to make this work. I wouldn't recommend it.

Altri suggerimenti

You're one superhack monkeypatch away from making this happen, but I wouldn't advise it. This will create a non-standard dependency. If you can get a pull request approved, then hey, by all means.

Why don't you just make shorter aliases if you're fretting about things like this?

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top