Hi all,
I try to call a task of a namespace from an other task !
Exemple:
ReleaseDirectory = File.join( “d:”, “release” )
namespace :release do
task :create do
mkdir_p ReleaseDirectory, QUIET
end
end
namespace :kernel do
task :compile do
end
task :release => [ ???? ] do
end
end
“???” What can I put ? I would like to use the task “:create” of the
namespace “:release”. Is there a way to resolve my problem ?
Thanks
Stephane W.
Ok, I found a solution but I don’t know if it’s a good solution.
I put the namespace :release in a variable.
Example:
releaseNs = namespace :release do
task :create do
mkdir_p ReleaseDirectory
end
end
namespace :kernel do
task :compile do
end
task :release => [ releaseNs[:create] ] do
end
end
What do you think of this solution ?
On 6/14/07, Stéphane Wirtel [email protected] wrote:
Hi all,
I try to call a task of a namespace from an other task !
Well, you’re not strictly “calling” the task. You’re making it a
dependency.
namespace “:release”. Is there a way to resolve my problem ?
task :release => ‘release:create’ do
Bob S. a écrit :
On 6/14/07, Stéphane Wirtel [email protected] wrote:
Hi all,
I try to call a task of a namespace from an other task !
Well, you’re not strictly “calling” the task. You’re making it a dependency
yes, sorry.
a dependency.
Do you think that my previous mail is a good solution ?