我希望任务以同样的方式获取参数,对调用者方法#invoke或#execute透明 desc "Add task" puts args.class::Task['add'].execute("arg1") # cannot set multiple arguments, will fail with "wrong number of arguments"
<
不可能在循环中执行相同的rake任务。但是,我希望能够调用rake first并遍历数组,并在每次迭代时使用不同的参数调用second。因为invoke只在第一次执行,所以我尝试使用execute,但是没有使用splat (*)运算符,并且只有一个参数。::Task["foo:second"].invoke(n,other_arg)
e
我正在尝试构建一个静态库,它的名字只有在我处理一些文件之后才能获得。我有这样的东西: # ... do some processing here, get a string representing theImaging libname contains a.libend
但是,当然,因为在任务运行时我不知道依赖项的名称,所以构建a.lib的代码不会被执行Imaging l