Sreeni,
 
Here's the link to the property task:  http://nant.sourceforge.net/nightly/help/tasks/property.html   You would basically add  overwrite="false" to any command-line parameters you plan to pass in.   
 
So, you could have something like this:
 
<property name="somename" value="Staging" overwrite="false" />
.....
<if test="${somename=='Staging'}">
    <!-- place staging code here -->
</if>
<if test="${somename=='Production'}">
    <!-- place production code here -->
</if>
 
HTH,
Felice
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]On Behalf Of Sreeni
Sent: Friday, September 10, 2004 7:25 AM
To: [EMAIL PROTECTED]
Subject: [Nant-users] passing command-line argument while compiling build

Nant Users,
 
I need a urgent help. I'm writing a build script(nant) for a ASP.Net project. I need to output the build based on a user input. Example Staging/Production. If user chooses Staging, then the build should be written to C:\Staging, If user chooses Production, then the build should be written to C:\Production. How can I achieve this? Is there any way to accept user input while compiling build script? I must be able to compare this value inside my script and then direct the build accordingly.
I would appreciate any help.
 
Regards,
Srini.

Reply via email to