문제

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>
도움이 되었습니까?

해결책

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.

다른 팁

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top