Question

Can I use tstamp property BuildDate in a nant task to an xecutable task in cruise control net as given below? if that is possible, Is my usage correct?

<tstamp property="BuildDate" pattern="dd-mmm-yy" verbose="true" />

  <exec executable="C:\WINDOWS\system32\cmd.exe">
    <buildArgs>/C rename "D:\Disk Images\Disk1" ICE_$(BuildDate)"</buildArgs>
    <buildTimeoutSeconds>10</buildTimeoutSeconds>
  </exec>
Était-ce utile?

La solution

Taking a first look everything looks fine so far... except for this: Use curly braces when accessing the property. So it's Disk1" ICE_${BuildDate}" instead of Disk1" ICE_$(BuildDate)".

UPDATE: Wait a minute... You're trying to pass the property back from NAnt to CCNET? No, that won't work. You may use the BuildDate property inside NAnt only.

Autres conseils

A cumbersome way to achieve this would be to write your values into a xml file using nant, and then use the modificationReader task.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top