souzaonofre / fabricate

Automatically exported from code.google.com/p/fabricate
0 stars 0 forks source link

Command arguments #54

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Currently it allows specifying multiple build commands. What I would find more 
useful is if it could allow parameter for a given action. Possibly allowing a 
single action sounds more useful.

The simplest way for dev-users would be to allow arguments for each action 
function.

Original issue reported on code.google.com by wer...@beroux.com on 13 Dec 2013 at 12:09

GoogleCodeExporter commented 9 years ago
You can pass extra_options to main(), see the docstring.  

I don't think Python optparse can handle options that apply only to one of 
several options.

Original comment by ele...@gmail.com on 13 Dec 2013 at 1:06

GoogleCodeExporter commented 9 years ago
Oh! I'll take a look. That might help, thanks.

Original comment by wer...@beroux.com on 13 Dec 2013 at 4:21

GoogleCodeExporter commented 9 years ago
I took another look at this, it would require actually to:

 1. Manually pre-parse the command-line arguments
 2. Same the parse extra command-line arguments in some global place
 3. Call fabricate.main() with the stripped commands-line args
 4. In the function, retrieve the extra command-line arguments.

Yes, quite a lot. So for now `python2 build.py run --some-flag --release` is 
not feasable.

Original comment by wer...@beroux.com on 3 Mar 2014 at 9:50