Gert,

>>> What exactly do you need it for ?

I've wished on several occassions for the ability to treat the target name(s) at the 
end of the nant command line as if they were command line parameters that could be 
detected in the script.

I'm a bit anal in that I spend a good bit of time on the user interface to my scripts, 
even if that interface is just a lowly command line.  I do things like validating 
parameter values, detecting conflicting parameters, provide intelligent defaults, and 
so on.  In general, I try to make the script behave intelligently with the minimum 
amount of input for the user.  

For example, the current NAnt script I am working on controls NUnit regression testing 
of the nightly build.  Actually, it can be used in three situations: 1) nightly build, 
2) developers about to check in their changes to CVS, and 3) the QA staff doing manual 
regression testing.  There is a -D:buildroot command line argument the developers use 
and a -D:msi argument the nighlty build people use.  Those two arguments are mutually 
exclusive, plus if neither is specified, the script defaults to using a build that is 
already installed at a standard location on the local machine.  This script quietly 
offers a lot more features than a plain old MAKE file could easily do--which is the 
main reason for NAnt in the first place.

Sometimes, when trying to make the script Do The Right Thing without making the user 
remember a bunch of niggling options, I find I would like to  know what targets have 
been specified on the command line as opposed to which target is currently executing.

I would like to see a function something like nant::get-target(n) where "n" is 0, 1, 
2, etc., specifying the n-th command line target.  If the specified target parameter 
doesn't exist, you would get back, say, an empty string.  Alternately, a 
nant::get_target-count() function could be used.


Merrill


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to