public
Created

A helper to alias a task in rake

  • Download Gist
alias_task.rake
Ruby
1 2 3 4 5 6 7 8 9
def alias_task(name, old_name)
t = Rake::Task[old_name]
desc t.full_comment if t.full_comment
task name, *t.arg_names do |_, args|
# values_at is broken on Rake::TaskArguments
args = t.arg_names.map { |a| args[a] }
t.invoke(args)
end
end

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.