Browse Source

Remind submitters to include the ASF copyright on new files.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274646 13f79535-47bb-0310-9956-ffa450edef68
master
Magesh Umasankar 22 years ago
parent
commit
e7113e29d0
1 changed files with 21 additions and 5 deletions
  1. +21
    -5
      patch.xml

+ 21
- 5
patch.xml View File

@@ -15,11 +15,11 @@
<property name="patch.file" value="patch.txt"/> <property name="patch.file" value="patch.txt"/>


<condition property="cvs.found"> <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>
<or>
<available file="cvs" filepath="${env.PATH}"/>
<available file="cvs.exe" filepath="${env.PATH}"/>
<available file="cvs.exe" filepath="${env.Path}"/>
</or>
</condition> </condition>


<target name="createpatch" if="cvs.found"> <target name="createpatch" if="cvs.found">
@@ -30,6 +30,22 @@
<delete file="${patch.package}"/> <delete file="${patch.package}"/>
<cvs command="-q diff -N" output="${patch.file}.tmp"/> <cvs command="-q diff -N" output="${patch.file}.tmp"/>
<replace file="${patch.file}.tmp" token="? " value=""/> <replace file="${patch.file}.tmp" token="? " value=""/>
<fileset dir="${basedir}"
includesfile="${patch.file}.tmp"
id="no.copyright.set">
<not>
<and>
<contains text="Copyright"/>
<contains text="Apache Software Foundation"/>
</and>
</not>
</fileset>
<pathconvert pathsep="${line.separator}"
setonempty="false"
property="no.copyright"
refid="no.copyright.set"/>
<fail if="no.copyright"
message="Please assign the Apache Ant Copyright to these files and retry:${line.separator}${no.copyright}"/>
</target> </target>


<target name="patchpackage" depends="newfiles"> <target name="patchpackage" depends="newfiles">


Loading…
Cancel
Save