[英]Rake - Adding to default task
I am using a third party gem that gives me the ability to execute some tests using the rake command: 我正在使用第三方gem,它使我能够使用rake命令执行一些测试:
rake jasminerice:run
Is it possible to include the task as part of default rake task? 是否可以将该任务包含为默认rake任务的一部分? (ie when I run rake
then rake jasminerice:run
is added to the rest of my tests). (即,当我运行rake
耙jasminerice:run
将添加到其余测试中)。 This is required for CI integration. CI集成需要此功能。
Any help would be greatly appreciated! 任何帮助将不胜感激!
In Rake, tasks can have dependencies. 在Rake中,任务可以具有依赖性。 Generally, you can do this: 通常,您可以执行以下操作:
task :hello do
puts "hello"
end
task :default => :hello
For your specific problem, you should be able to do this: 对于您的特定问题,您应该可以执行以下操作:
task :default => "jasminerice:run"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.