Sha256: 24b88e4068ca671bd23588e3b7c05f4f1194ad4efbc63e3ec11d606dac4430d5
Contents?: true
Size: 802 Bytes
Versions: 9
Compression:
Stored size: 802 Bytes
Contents
require_relative '../ext/string' def load_app_rakefile @app_rakefile_loaded ||= begin load './Rakefile' end end namespace :drake do desc "task runner to optionally invoke tasks" task :runner do runner_tasks = ENV["runner_tasks"] || "" optional = ENV["runner_optional"] app_task = ENV["runner_app_task"] load_app_rakefile if app_task tasks = runner_tasks.split(',') task = tasks.find { |i| Rake::Task.task_defined? i} if task puts "#{"\u2219".bold.yellow} #{task}" Rake::Task[task].invoke else if optional puts "#{"WARN".yellow} any of the tasks not found: #{tasks}" else abort "#{"ERROR".red} any of the required tasks not defined: #{tasks}" end end end end Dir.glob('dply/*.rake').each { |r| load r}
Version data entries
9 entries across 9 versions & 1 rubygems