Skip to content

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
example arg pasing in rake
desc 'shortcut to do:dev'
task :do => 'do:dev'
namespace :do do
FileList["#{CONFIG_DIR}/*.json"].each do |f|
target = File.basename(f, '.*')
desc "do stuff for #{target}"
task target do
Rake::Task['do:stuff'].invoke(target)
end
end
task :junk, :target do |t, args|
puts "doing junk first"
puts args.inspect
end
task :otherstuff, :target do |t, args|
puts "doing otherstuff"
puts args.inspect
end
task :stuff, [:target] => [:junk] do |t, args|
target = args.target
puts "doing stuff"
puts args.inspect
Rake::Task['do:otherstuff'].invoke(target)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.