Summary:
How can I deploy a property with the value "download \ $ {bulidmode} \ project \ setup.msi" to load \ Debug \ project \ setup.msi "if the buildmode property contained debug, so I can use it as the file =" "part <copy>
More details:
I have a little requirement to be able to extend properties inside a string in nant.
For example, I have a target that copies file A to B. A and B both come from a simple two CSV file field, which I repeat with
<foreach item="Line" in="filelist.csv" delim="," property="source.file,target.file">
<property name="sourcefile" value="${path::combine(source.dir,source)}" />
<property name="targetfile" value="${path::combine(download.dir,destination)}" />
<echo message="Copy ${sourcefile} to ${targetfile}" />
<copy file="${sourcefile" tofile="${destination}" />
</foreach>
and the list.csv file will be
build\manifest.xml
solutiondirectory\setup-proj-directory\Release\setupproj.msi,ProductA\ProductA.msi
solutiondirectory\another-proj-dir\Release\setupproj.msi,ProductB\ProductB.msi
(The reason we share this is because we write multilevel applications and deploy MSI to each level - so a single product has several msi built with the same version numbers)
- , "Release" filelist.csv, - ${build.mode}.
<foreach item="String" in="Release,Debug" delim="," property="build.mode">
....as above
</foreach>
, , .
, .