我有一个Rakefile,可以根据全局变量$build_type,用两种方式编译项目,可以是:debug或:release(结果放在单独的目录中):
task :build => [:some_other_tasks] do
end
我希望创建一个任务,依次使用两种配置来编译项目,如下所示:
task :build_all do
[ :debug, :release ].each do |t|
$build_type = t
# call task :build with all the tasks it depends on (?)
end
end
有没有办法像调用方法一样调用任务?还是我可以实现类似的目标?
摇曳的蔷薇
繁花如伊
慕姐4208626
相关分类