Hi
all,
I'm trying to create a task that will copy my
binaries to a seperate folder after compilation. I created a csv file with the
list of files to copy and let Nant iterate through it.
Depending on the value of a property however I want
to decide whether or not to copy these files.
I can't seem to find any documentation on how to do
this exactly.
Here's a snippet from my build file:
<property name="mySwitch"
value="on"/>
<foreach item="Line" in="binaries.csv" delim="," property="sourcePath,destinationPath,filename">
<copy todir="${binaries.dir}${destinationPath}" overwrite="true">
<fileset basedir="${string::replace(sourcePath,'[CONFIGURATION]', configuration)}">
<includes name="${filename}" if="test if mySwitch == 'on'" />
</fileset>
</copy>
</foreach>
<foreach item="Line" in="binaries.csv" delim="," property="sourcePath,destinationPath,filename">
<copy todir="${binaries.dir}${destinationPath}" overwrite="true">
<fileset basedir="${string::replace(sourcePath,'[CONFIGURATION]', configuration)}">
<includes name="${filename}" if="test if mySwitch == 'on'" />
</fileset>
</copy>
</foreach>
Can someone please tell me what the
exact if-statement should look like or where I can find documentation for
more info?
TIA,
-Jo
-Jo
ps. I know it's odd to perform the check inside the
loop, but this will make sense when I extend the script later
on.