Tuesday, April 6, 2010

Ant append to a file using echo task

Learnt a new thing that you can use echo task and redirect its output to a file.

        <propertyfile
            file="${deploy.path}/svninfo.txt"
            comment="File containing build version,Build Date and svn info">
          <entry  key="Version" value="${revisionProperty}"/>
          <entry  key="Build Date" type="date" value="now"/>
        </propertyfile>

        <echo file="${deploy.path}/svninfo.txt" append="true">
==============Svn Info==============
${svnInfoOut} 
====================================
        </echo>

No comments:

Post a Comment