ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <jakarta-...@ehatchersolutions.com>
Subject Re: Ant file to create patch file
Date Wed, 04 Jun 2003 00:00:24 GMT
+1   - nice.  anything that helps folks submit patches is a good thing!


On Tuesday, June 3, 2003, at 03:06  PM, Magesh Umasankar wrote:

> Creating patches to submit to Ant can be standardized as well
> as made easier with the following patch.xml file.  If you
> consider this useful, I will add it to the repository.  Please
> comment.
>
> <project name="create-patch" default="patchpackage" basedir=".">
>     <property name="patch.package" value="patch.tar.gz"/>
>     <property name="patch.file" value="patch.txt"/>
>
>     <condition property="cvs.found">
>       <or>
>         <available file="cvs"     filepath="${env.PATH}"/>
>         <available file="cvs.exe" filepath="${env.PATH}"/>
>         <available file="cvs.exe" filepath="${env.Path}"/>
>       </or>
>     </condition>
>
>     <target name="createpatch" if="cvs.found">
>         <cvs command="-q diff -u" output="${patch.file}"/>
>     </target>
>
>     <target name="newfiles" depends="createpatch">
>         <delete file="${patch.package}"/>
>         <cvs command="-q diff -N" output="${patch.file}.tmp"/>
>         <replace file="${patch.file}.tmp" token="? " value=""/>
>     </target>
>
>     <target name="patchpackage" depends="newfiles">
>         <tar basedir="${basedir}"
>             tarfile="${patch.package}"
>             compression="gzip"
>             includesfile="${patch.file}.tmp"
>             excludes="${patch.file}.tmp"/>
>         <delete file="${patch.file}.tmp"/>
>     </target>
> </project>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org
>


Mime
View raw message