Rake Arguments#905
|
|
There are some rake tasks that I need to execute that require command line parameters (rake db:migrate VERSION=0, for instance). Similar to the “Nant Arguments” post, I tried setting the target attribute to “db:migrate VERSION=0”, but that’s not working. I’m guessing that behind the scenes, the target is encapsulated in quotes because I get “Don’t know how to build task ‘db:migrate VERSION=0’”. Even though the Configuration Reference doesn’t indicate it, I tried doing ‘<rake args="VERSION=0" target="db:migrate" />’ (stealing the args attribute from the exec task in hopes that it would work), and ‘<rake target="db:migrate">VERSION=0</rake>’ (just as a shot-in-the-dark), but some kind of XML Schema validation stripped those extra pieces out when I clicked the Save link. Right now, we’re using CruiseControl.NET, and I’m executing rake tasks through the built-in exec task. I’m thinking I might have to do something similar with the exec task in Cruise, but I would hate to have to do that when there’s a built-in rake task now. Am I missing something with Cruise’s configuration that could help? |
|
|
Hi there. I just double checked the code and you are exactly right as to the nature of the problem. We are, indeed, wrapping the target field in quotes. I’m going to file this as a bug. In the meantime, the work around is to use the exec task. Chris |
